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!

calculating Variables

Status
Not open for further replies.

TheBlondOne

Programmer
May 22, 2001
346
GB
Hi all,

I am creating a report that contains a sub report. In the subreport is a list of different costs and their type. In the main report their is the department and the charge system code. The report is grouped by the department and the subreport links to the department id aswell. I am passing a shared variable from the subreport to the main report which is a total cost for each department and this works fine, the problem that i am having is i need to create a grand total i.e the total cost of everything for all departments. Has anyone got any ideas on how i could achieve a grand total from the variable information. Thanks in advance
 
Pass the shared variable amounts to another variable in the department group of the main report.

WhilePrintingRecords;
NumberVar HoldingVariable;
Shared NumberVar SharedVariable;

HoldingVariable := HoldingVariable + SharedVariable;

Then call HoldingVariable in the Report Footer.

Naith
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top