How to Append a new row |
Post Reply |
Author | |
slvrbllt
Groupie Joined: 16 September 2006 Status: Offline Points: 14 |
Post Options
Thanks(0)
Posted: 24 June 2008 at 11:15am |
Hello, I would like to insert a new record at the very bottom of an existing Report control by using the AddRecordEx method. Unfortunately the new row is always added on top of the other rows and not at the end of the list. [...] 'Create tmpRec and populate its items OtherObject.rptList.AddRecordEx tmpRec Any clue ? Maurizio
|
|
Aaron
Senior Member Joined: 29 January 2008 Status: Offline Points: 2192 |
Post Options
Thanks(0)
|
Hi,
Just use:
Dim i, j As Long
Dim XtremeRecord As XtremeReportControl.ReportRecord Dim XtremeRecordItem As XtremeReportControl.ReportRecordItem For i = 0 To 10 Set XtremeRecord = wndReportControl.Records.Add() For j = 0 To 10 Set XtremeRecordItem = XtremeRecord.AddItem(i & " - " & j) Next j Next i |
|
Product: Xtreme SuitePro (ActiveX) version 15.0.2
Platform: Windows XP (32bit) - SP 2 Language: Visual Basic 6.0 Zero replies is not an option.... |
|
slvrbllt
Groupie Joined: 16 September 2006 Status: Offline Points: 14 |
Post Options
Thanks(0)
|
Thanks for your reply, Aaron! I am afraid I haven't been clear enough. Sorry for that!
I surely now how to add a new row using the "Add" method. Infact my question included the clause "by using the AddRecordEx method"
Oddly the ".Add" method appends a row at the end, while ".AddRecordEx" insert it at the top ! I expected that all the "Add..." methods behaved consistently...
You'd surely agree that it is much more easier to insert a new record by typing:
ReportControl.AddRecordEx newRecordObject
instead of going through a loop!
Any other clues ? Oleg ? :-)
|
|
Aaron
Senior Member Joined: 29 January 2008 Status: Offline Points: 2192 |
Post Options
Thanks(0)
|
Hi,
I don't see a difference with AddRecord and AddRecordEx when adding NEW records to RC. You have to add your items anyway to the record itself (loop or no loop, you have to "create" the record anyway). But maybe I see it wrong and I would love to see a sample that would change my opinion.
But for your issue: I think you don't Call wndReportControl.Populate after you added the record
|
|
Product: Xtreme SuitePro (ActiveX) version 15.0.2
Platform: Windows XP (32bit) - SP 2 Language: Visual Basic 6.0 Zero replies is not an option.... |
|
Aaron
Senior Member Joined: 29 January 2008 Status: Offline Points: 2192 |
Post Options
Thanks(0)
|
Hi,
I thought so... Glad I could help you.
|
|
Product: Xtreme SuitePro (ActiveX) version 15.0.2
Platform: Windows XP (32bit) - SP 2 Language: Visual Basic 6.0 Zero replies is not an option.... |
|
slvrbllt
Groupie Joined: 16 September 2006 Status: Offline Points: 14 |
Post Options
Thanks(0)
|
Hi Aaron,
Sorry for getting back to you so late, but I've been away for a while.
Your suggestion doesn't help at all ! :-)
Like I said, AddRecordEx actually adds a new record on TOP of the others instead of at the bottom of the list, just like AddRecord does.
Anyway thank you for your replies. :-)
Bye.
|
|
Aaron
Senior Member Joined: 29 January 2008 Status: Offline Points: 2192 |
Post Options
Thanks(0)
|
Hi,
To prove it works as I say, here's a test project. Maybe you do something wrong, I don't know. Check the sample project yourself
|
|
Product: Xtreme SuitePro (ActiveX) version 15.0.2
Platform: Windows XP (32bit) - SP 2 Language: Visual Basic 6.0 Zero replies is not an option.... |
|
Post Reply | |
Tweet
|
Forum Jump | Forum Permissions You cannot post new topics in this forum You cannot reply to topics in this forum You cannot delete your posts in this forum You cannot edit your posts in this forum You cannot create polls in this forum You cannot vote in polls in this forum |