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!

How to get report totals in the page footer section?

Status
Not open for further replies.

kmccrensky

Programmer
Mar 8, 2005
3
US
How can I get the report footer data to appear in the page footer section? I've tried several things but all of them show running totals and data in the page footer rather than the grand total data.

The report footer data is compiled using formulas...not fields.


Background
******************
Report Purpose: Show how many widgets, types of widgets a sales person sold in the date range provided by the user. The report prints one Sales Rep's counts per page. The last page of the report shows a grand total of all the sold widgets, average number of widgets sold, etc.

How it's used: The manager runs the report every morning to see how the Sales Reps are doing. He looks at everyone's counts...and then gives each Sales Rep the portion of the report with his/her numbers on it.

Problem: I want the Sales Rep's to see their individual numbers plus the grand total data on their printout. This enables the sales rep to compare his performance to the group's performance.
 
I think what you want is to group by the sales reps and place totals in the group footer. You misunderstand what a page footer is intended for.

You *could* use the page footer, but why would you want to, it can only cause problems, whereas a group by sales rep with a new page after will assure that the data is always correct, and you can select print at bottom of page for the group footer.

-k
 
I think you could save a copy of the report as a subreport where you suppress all but the report footer with the totals you want displayed. Place this subreport in the page footer.

-LB
 
Thanks for the replies.

The report already groups by Sales Rep. Formulas with local and global variables are used to create the Sales Rep's counts (we use complex logic when determining if a sales rep should get credit). The local variable keeps track of the individual sales rep's numbers and is reset when the group changes (ie. reset when it starts counting for the next sales rep).

The global variables are used to calculate the grand totals that are placed in the report footer.

I am open to placing the report grand total data in any section --- so long as it appears on every page of the report. :)

LB, I'll give that a whirl and update the post.
 
The grand totals should work in the page footer providing they are formulas, and not Running Totals. Generally you can do anything that a Running Total does in a formula, it's just a bit more code.

If you use a grouping on an evaluate->use a formula RT, then you'll need to add the criteria into a formula in the details, right click it and select insert->Summary-Sum for the group to get the same results. The advantage to a summary function is that they are available throughout the report, whereas a Running Total is available at the end of the report.

-k

 
I think I'm dead in the water. The sales rep counts are so complicated, that all the counts are generated by formulas. The formulas use local and global variables. The local variables are reset when the group changes. No problem here.

The global variables (unfortunately) behave like running totals. (even though technically they are formulas). The formulas add each group's totals to the global variables. Then the global variables are returned in the report footer for the grand total information.

K, I don't understand the second paragraph of your last post. Can you please clarify? thanks! :)

 
I'll just take your word for it that it's too complicated.

Whatever you're doing in Crystal, you should do on the database if it's that complicated.

And whatever you're doing in these formulas copuld certainly be returned from a subreport (slow though).

-k
 
You could still use a subreport for this, as I suggested earlier, as long as you are not already using subreports to generate your totals (since you cannot use nested subreports).

-LB
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top