I have a report that once run is about 6000 pages. Every 50 pages I would like to insert a summary page that shows the grandtotals for values in the previous 50 pages. Any ideas on how to do this?
For Crystal 8.5, create a section that is normally suppressed, but has the 'new page' option checked. Use a suppression formula that divides PageNumber by 50, truncates it and then multiplies it by 50 again. When this returns the PageNumber, don't suppress.
You might have trouble because the section changes the value it is testing. A bit of trial-and-error should sort it out, though. Maybe one section to change the page and another to print on the 50+1 page
Place this in every group header and footer section and also in the detail section (Do NOT add the line number formula to the detail_b section that you will be inserting below). Then check to see what the linenumber is for the last record on page 50. Let's say it is 2000.
Next go to format section->details. Insert a details_b section and format "suppress blank section" with the following formula:
remainder({@linenumber},2000) <> 0
Then for BOTH "New Page After" and "New Page Before" for detail_b enter:
remainder({@linenumber},2000) = 0
You should now have a blank page after every 2000 records.
If you want the summaries on this page to be running subtotals, then use the running total editor to add the relevant subtotals, using {table.amount}, sum, evaluate for each record, reset never.
If you want the summaries to reset after the summary page then you will need to use formulas like the following:
whileprintingrecords;
numbervar amt;
if remainder({@linenumber}, 2000) = 1 then
amt := {table.amount} else
amt := amt + {table.amount};
amt;
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.