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

Cascading Group Formulas 1

Status
Not open for further replies.

O2BNSV

Technical User
Jun 29, 2006
104
US
using v2008: I have a report with a number of groups. However, the groups are not constant in that group #4 might be {table.fund} or {table.package} depending on whether or not group #3 is equal to a certain value. Ultimately, I need to create a summary on the final group based on a value in the detail section. In order to get on of the detail values to calculate correctly, I had to share some variables from a sub-report, then perform a calculation in the main report to get the detail value I need. However, when I place the calculated total in the detail section, I am unable to create a summary. Is there a workaround for this?

 
Don't know what you mean by the "final group"--Group Footer #1? Anyway, to summarize the calculation in the detail section, insert another detail section (c?), and add a formula like this:

whileprintingrecords;
numbervar sumcalc := sumcalc + {@yourcalc};

Then in the group header (#1? corresponding to your "final group"), place a reset formula:

whileprintingrecords;
numbervar sumcalc;
if not inrepeatedgroupheader then
sumcalc := 0;

In the group footer, use the following formula to display the desired result:
whileprintingrecords;
numbervar sumcalc;

-LB
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top