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 Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

manually count pages

Status
Not open for further replies.

scarter1

Programmer
Mar 9, 2002
14
0
0
CA
I am having a problem with page numbering in my report. The user selects if they would like to print the current page, a particular section or the entire document. I want the page numbers to be the same for a particular record regardless of whether they choose to print current, section or all pages. So for instance, if the current record they are viewing would be page 10 if they chose to print the entire document then I want page 10 to appear if they choose to print the current page however, it prints page 1.

I have tried to get around it by doing the following:
1) I print the entire document
2) I increment the pages in code on the section_format routine
3) I have an if statement to determine if they record is the one that should actually be printed
4) if yes, then report.suppress = false
5) then I print the footer with the page number I have counted.

This almost works. Here is the issue (finally). If there is a record that is too long for one page and actually would be two pages but I am suppressing this record because it is not the one to be printed then it only counts it as one page not two so all of the page numbers after are incorrect. Does anyone know any way around this problem or does anyone have another solution to this problem? Please help if you can, I am desperate.

Thanks very much in advance!!
 
Why are you programming the option to print a certain page?

Just let the user view the whole report and then print from the viewer....they can print any page or series of pages they want...

Jim
 
When they are viewing the page, is their an option to print that page right from the viewer? If not, I am not using the viewer currently because it is not necessary (because they will be viewing the page in the vb program) so I don't want them to have first view the entire document, find the pages they want to print and then enter the pages in manually. But if there is an easy way for them to print the page the are currently on (in the vb) program using the viewer and please let me know.

Thanks very much for your reponse.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top