Unable to print Dataset contents on more than one page

kh_mneimneh

Member
Joined
Feb 27, 2006
Messages
7
Programming Experience
Beginner
Hi
I am trying to print the contents of a dataset that needs printing on more than one page.
I am doing fine if the data fits on one page only. but if the data requires more than one page, printing is repeated from the start on all the next pages instead of continuing print of data after first page.:mad:
I am using a loop to print the data.
Can anyone please help
 
Add an integer variable myIndex outside the printing submethods, start with this index and as you print a row or item or something update the index. When first page is filled and you find there are more pages printpage event handler is executed again, but this time it will continue printing where myIndex left off from last page.
 
Thank you JohnH,:)
Your reply gave me an idea.
I used a static integer index inside the printpage sub, increment it after each row, and it worked fine.
 
Back
Top