Using Page X of Y crippling report peformance

Antilles

Registered User.
Local time
Today, 09:08
Joined
Jan 13, 2009
Messages
13
I have a fairly basic Access 97 report with a couple of sub reports in it.

The report takes a long time to run (sometimes 30 mins or more). It has a Page X of Y field in the footer. If I remove this, the report runs in seconds.

Any idea's what's going on? Is this a quirk of Access?
 
I've always heard this was an issue and told not to ever use page x of y for the reason you stated. In order to calculate Y, the report has to build the entire report then go back and add in this calculation to each page BEFORE it can actually print the report. If you only use page X the report can spool to the printer as it builds, and therefore runs much faster.
 
I think you're absolutely right - it seems to be building the entire report to work out how many pages are there.

If you take of Page X of Y it looks like it just builds the pages as it need them.

Think I'll just remove the X of Y and put up with the complaints from users.
 
You can still page number your report but without the total number of pages.
 
If the report is a simple tabular one without any group breaks and headers, etc, you could probablt calculate the number of pages based on the record count - especially if you impose a fixed number of records per page (there are other threads on how to do this). Although a Google-style 'page 13 of about 27' might be quite fun...
 
it would have to, wouldnt it - it couldnt know how many pages there were without getting to the end - but you wouldnt think it would then take it so long to add these page counts.

I tend to put a "[end of report]" line in the report footer to indicate its the end!
 
As I say, if it's a really simple report, it might be possible to accurately calculate the number of pages, if the records per page were controlled or consistent, but most reports are more complicated than that.

End of report does it nicely enough, yes.
 

Users who are viewing this thread

Back
Top Bottom