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!

Adding Sums from different reports

Status
Not open for further replies.
Jul 24, 2007
25
US
Goodafternoon to all,

I have a report which contains a subreport. I want to add figures from the subreport and main report for a grand total figure. Is that possible considering, they are actually 2 seperate reports.

Crystal 10
Win XP

Thank You,
Marco
 
Yes, you can use shared variables. How you do this depends upon what report section the subreport is in, so please let us know. A little more explanation about the calculation would help, too.

-LB
 
I used shared variables as you suggested.
I needed to pass a totals value from my subreport to the main repoort, and add them both for a grand total.

The subreport is in my 'container report' footer.

I added the following formula was added to the subreport:
WhilePrintingRecords;
Shared CurrencyVar sharedcredit := Sum ({tb002_LCRTransRep.Credit}, {tb002_LCRTransRep.GLNumber})

Added the below formula to to the main report:
WhilePrintingRecords;
Shared CurrencyVar sharedcredit;
sharedcredit

I then inserted an additinal footer, and placed the grand totals formula in this section:
{@MainSharedCreditTotal}+Sum ({tb002_LCRTransRep.Credit}, {tb002_LCRTransRep.GLNumber})


Thanks you,
Marco
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top