Hi!
(im using version 10.1)
i have a problem when i use the the FixedRowHeight property like:
ReportControl.PaintManager.FixedRowHeight = False
and then:
Set Column = rcRC.Columns.Add(i, "name", 20, True) that line produces an error descripted as :
"
Error '-2147417848 (80010108)' in runtime: Error in the method 'add' of the object 'IReportColumns'
"
This occurs after i use the deleteall method from columns and i try to add a new column
does any know the reason of the error? or a tip to resolve or fix?
note : i need to use the "autoheight of the row" feature.
Thanks in advance.
code for reproduce this hint:
(put in a command button and press a few times until error shows)
Dim registro As ReportRecord Dim Item As ReportRecordItem Dim Column As ReportColumn Dim i As Integer Dim j As Integer
ReportControl1.columns.DeleteAll ReportControl1.Records.DeleteAll
ReportControl1.Populate > this line fixes the problem! ReportControl1.PaintManager.FixedRowHeight = False 'this performs the error '*************************************************************************** Dim columns As Integer columns = (Rnd - 1) + 6 Debug.Print "Im using " & columns & " columns now" For i = 0 To columns Set Column = ReportControl1.columns.Add(i, "asd", 20, True) Column.Alignment = xtpAlignmentWordBreak 'if i use this is irrelevant
Next i '*************************************************************************** For j = 0 To 8 Set registro = ReportControl1.Records.Add()
With registro
For i = 0 To columns Set Item = .AddItem("asdasd" & Rnd) Next i
End With
Next j '*************************************************************************** ReportControl1.Populate '*************************************************************************** Set registro = Nothing Set Item = Nothing Set Column = Nothing
------------- Product: Xtreme SuitePro (ActiveX) version 11.
Platform: Windows XP (32bit) - SP 3
Language: Visual Basic 6.0 SP 6
Spanish, Espaņol, English.
Argentina
|