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

Speedy way to get total number of pages in a report?

Status
Not open for further replies.

NeilT123

Technical User
Jan 6, 2005
302
GB
I have a report with a sub report and historically the subreport has only been 1 page so I have been able to use a record count to give me the total number of pages in the page.. of .. footer.

Some of the subreports are now stretching to 2 pages so using the above means I can get page 64 of 58 which is no good.

If I use =[pages] to get the total number of pages then typically a 62 page report takes 35 seconds to load. If I delete the =[pages] text box the report loads in 2 seconds.

Is there a speedy way to get a total number of pages when using subreports?
 
In case any one else is suffering this issue I have found a work round by basing the report and the sub reports on temporary tables. On opening the report I use SQL to populate the 7 tables and the report now loads in about 4 seconds and I am using =[pages] so the page count is correct.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top