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

Page Numbering

Status
Not open for further replies.

rose4567

Programmer
Mar 12, 2007
70
US
Hello all,

I have a report that my customer wishes to print and insert into a larger document. They wish to control where page numbering begins. I have a field I have customized I can pull the number from. The field is pageNbr. The customer will enter the numeric value of the the starting page number.

Does anyone know how I could go about using the value of this field as the starting page number in my report, then counting total page numbers, so I can display like:
"Page 2 of 16"
"Page 3 of 16"
etc.
Please be aware, I will be using Adobe PDF to render. I know the number of pages that display can vary between render types, so if this will affect the code to use, just FYI.

Any help would be greatly appreciated.

Thank you!!
 
Untested:

Create a parameter for the starting page number, say "StartPage". Then, in the page footer, in the formula for a TextBox, put
Code:
="Page " + (Globals!PageNumber + Parameters.StartPage.Value).ToString + " of " + (Globals!TotalPages + Parameters.StartPage.Value).ToString
 
Very nice. Just one small tweak and the code works perfect. I had to subtract one so if they enter "2" the first page is "2", not "3". Tested. Works.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top