Print Page | Close Window

problem with delete row in reportcontrol

Printed From: Codejock Forums
Category: Codejock Products
Forum Name: Report Control
Forum Description: Topics Related to Codejock Report Control
URL: http://forum.codejock.com/forum_posts.asp?TID=6967
Printed Date: 13 November 2024 at 11:34pm
Software Version: Web Wiz Forums 12.04 - http://www.webwizforums.com


Topic: problem with delete row in reportcontrol
Posted By: Guillermo
Subject: problem with delete row in reportcontrol
Date 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"
 



Replies:
Posted By: pcmaker
Date Posted: 15 May 2007 at 2:39pm
FOR EACH DELETE, USE A POPULATE.

TRY IT, AN ADISEME WHAT HAPPEND!

GOOD LUCK!!!


Posted By: sserge
Date 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



Print Page | Close Window

Forum Software by Web Wiz Forums® version 12.04 - http://www.webwizforums.com
Copyright ©2001-2021 Web Wiz Ltd. - https://www.webwiz.net