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

Summaries of variables 1

Status
Not open for further replies.

Shnibnib

Vendor
Aug 9, 2005
4
GB
I have a shared number variable in a subreport in Details (a) section. This is passed into the main report and a formula field calculates this and returns a number.

I want to then produce a sum of these at the bottom of the report, but I cannot seem to do this.

Could anyone help?

Thanks

Shnib
 
Let's say your calculation formula that references the shared variable is in detail_b. You can amend it as follows to add a variable that will collect the results across records:

whileprintingrecords;
shared numbervar x;
numbervar calc := x * .05; //your calculation
numbervar sumcalc := sumcalc + calc; //this accumulates it
x //this displays the original calcultion

Then in the report footer, place a formula like this for display:

whileprintingrecords;
numbervar sumcalc;

-LB
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top