Codejock Forums Homepage
Forum Home Forum Home > Codejock Products > ActiveX COM > Report Control
  New Posts New Posts RSS Feed - problem with delete row in reportcontrol
  FAQ FAQ  Forum Search   Events   Register Register  Login Login

problem with delete row in reportcontrol

 Post Reply Post Reply
Author
Message
Guillermo View Drop Down
Newbie
Newbie


Joined: 08 September 2006
Status: Offline
Points: 6
Post Options Post Options   Thanks (0) Thanks(0)   Quote Guillermo Quote  Post ReplyReply Direct Link To This Post Topic: problem with delete row in reportcontrol
    Posted: 24 April 2007 at 12:57pm
I use the following command for fill and delete row in reportcontrol
 
         wndReportControl.Records.DeleteAll
         call addrecordwndr          ' sub for add records to report control         
         wndReportControl.Populate
         
Report control status is:  add 5 records (A,B,C,D,E ) is OK, show report control with 5 records is OK.
 
I read the report control with:
i=0
For Each Fila In wndReportControl.Records
            Label5.Caption = wndReportControl.Records(i).Item(2).Value
            .
            .
            .
next
 
read is OK.
 
when i execute again,
 
         wndReportControl.Records.DeleteAll
         call addrecordwndr          ' sub for add records to report control         
         wndReportControl.Populate
 
AND Now, Addrecordwndr only add 4 record (B,C,D,E)
Show this 4 records is OK.
 
BUT,
 
i=0
For Each Fila In wndReportControl.Records
            Label5.Caption = wndReportControl.Records(i).Item(2).Value
the result is label5.caption="A",  WHY? this row is not showing in reportcontrol.
The reportcontrol only show 4 record "B", "C", "D" and "E"
 
Back to Top
pcmaker View Drop Down
Groupie
Groupie
Avatar

Joined: 05 May 2005
Location: Venezuela
Status: Offline
Points: 23
Post Options Post Options   Thanks (0) Thanks(0)   Quote pcmaker Quote  Post ReplyReply Direct Link To This Post Posted: 15 May 2007 at 2:39pm
FOR EACH DELETE, USE A POPULATE.

TRY IT, AN ADISEME WHAT HAPPEND!

GOOD LUCK!!!
Back to Top
sserge View Drop Down
Moderator Group
Moderator Group


Joined: 01 December 2004
Status: Offline
Points: 1297
Post Options Post Options   Thanks (0) Thanks(0)   Quote sserge Quote  Post ReplyReply Direct Link To This Post Posted: 15 May 2007 at 6:57pm
Originally posted by Guillermo Guillermo wrote:


...
BUT,
 
i=0
For Each Fila In wndReportControl.Records
            Label5.Caption = wndReportControl.Records(i).Item(2).Value
the result is label5.caption="A",  WHY? this row is not showing in reportcontrol.
The reportcontrol only show 4 record "B", "C", "D" and "E"


For Each Fila In wndReportControl.Records -- i is not changed there.

Look below:


For Each Fila In wndReportControl.Records
            Label5.Caption = Fila.Item(2).Value
            ...


--
WBR,
Serge
Back to Top
 Post Reply Post Reply
  Share Topic   

Forum Jump Forum Permissions View Drop Down

Forum Software by Web Wiz Forums® version 12.04
Copyright ©2001-2021 Web Wiz Ltd.

This page was generated in 0.234 seconds.