Kingsley
It's difficult to say exactly where things are bogging down.
It could be, as you suggest, the complexity of the queries populating the report. It could be subqueries involved. It could be the drawing of the diagrams.
Some things you might try...on a copy of the database...
1. Comment out the 2 lines following the Preview line in your code (to see if the formation of the SNP is slowing things down)
2. Rebuild things, piece by piece, testing as you go, to see what part of the process is creating slowness.
Notes from a book I have...to speed up the production of reports...
1. Create indexes on all query columns used in ad hoc query joins
2. Include as few columns as possible in the result set, avoiding fields not used in the final output of the report.
3. Move expressions to the report
4. Use Count(*) instead of Count([column])
5. Use the Between operator rather than open-ended >, >= and <= restrictions
6. Avoid situations in which one query pulls the data from tables and a second query just filters the data. The more information you can pull together in one query, the better, as one query uses less memory.
7. If using subreports, if the main and subreport's record source are the same, try rethinking your design so you can work without the subreport.
8. Use subreports to replace multiple expressions that call domain functions such as DLookup or DSum. On the other hand, if you need to look up only a single value, using a domain function may be faster.
Don't know if any of this applies, but thought I would include it anyway.
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.