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!

Running Total Variable Spanning Multiple Subreports? 1

Status
Not open for further replies.

MCuthill

Technical User
Jul 19, 2006
669
CA
Hi Everyone,

I am building an Assets/Liability section on a client profile report. The database houses these two sections in multiple tables each. For example: Assets is made up of Real Estate, Serial Numbered Goods, Investments, Inventory, etc etc etc.

What I am wondering is if I can set up a shared variables to house a running total spanning all of the subreports in a section (1 for assets and another for liabilities) or if I have to use multiple shared variables for each section. (one for real estate, a second for serial numbered goods, etc) and then add each of these individual variables to hold the "Total Assets".

Thanks,

Mike
______________________________________________________________
[banghead] "It Seems All My Problems Exist Between Keyboard and Chair"
 
One should work fine, just reference the same one if the intent is to sum them all, as in:

subreport1:
shared numbervar MyGrandTotal:= sum({table.field})

subreport2:
shared numbervar MyGrandTotal:= MyGrandTotal+sum({table.field})

etc.

Then you cna reference the result in another formula:

shared numbervar MyGrandTotal

-k

 
Brilliant!

Thank you very much synapsevampire, saved me a tonne of work (and testing).

Regards,

Mike
______________________________________________________________
[banghead] "It Seems All My Problems Exist Between Keyboard and Chair"
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top