Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations biv343 on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Printing using a data reader

Status
Not open for further replies.

kyledunn

Programmer
Jan 2, 2001
145
US
In a PrintPage event I am opening a data reader and reading the records in a while loop. When I reach the MarginBounds I am setting e.HasMorePages to true followed by a return statement. When the next page attempts to print and the PrintPage event executes again it runs all of the code within the PrintPage method creating an error condition and does not just continue at the same place in the while loop. How is the process of printing a large number of records from a database usually handled?

Kyle
 
Kyledunn,

Printing is an issue I am also interested in although I do not know very much about it myself. I have tried using some of the css specification information on paging etc but I don't think I know enough to make it work correctly(on some web based reports I have worked with).

So if you find out more information I would like it if you could post some of it here.

Also if you could post your code here it might help someone identify a potential problem.

Crystal
crystalized_s@yahoo.com

--------------------------------------------------

Experience is one thing you can't get for nothing.

-Oscar Wilde

 
Hi Crystal,

I solved my problem by using a dataview and keeping track in global variables which page and data record I was printing. I had to construct each page explicitly as it was being printed. Works quite well.

Kyle
 
I did discover the part of the css specification that accomplished what I needed to have done.

<p STYLE=&quot;page-break-before:always&quot;>

This worked for what I required (basically my report has 3 distinct sections that I was able to insert the breaks between them. Not likely that this is a help to you but I thought it might help someone else who finds this thread. Crystal
crystalized_s@yahoo.com

--------------------------------------------------

Experience is one thing you can't get for nothing.

-Oscar Wilde

 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top