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!

Calculating a formula between two subreports

Status
Not open for further replies.

PPetronas

Programmer
Nov 13, 2008
14
US
Hi,

I have a subreport A which has the processed_counts.
I have a subreport B which has the Total Counts.
I need to insert a field "Difference" in Subreport B which will be Total Counts (from subreport B )-Processed Counts (from subreport A)
How do I go about getting this?

I appreciate your help!

Thank you ,
Petronas
 
i think you can used a global shared variable to 'share up' the value from subreport A to the parent report and then 'share down' to subreport B.

something like in subreport A:
//{@SharedProc}
shared numbervar shup := {@proc_count};

and like this in the main report:
//{@SharedProcM}
shared numbervar shup;

and like this in subreport B:
//{@SharedProcD}
shared numbervar shup;

then use it to calc the difference.
//{@diff}
{@total_count} - {@SharedProcD}



my standard disclaimer applies...i do not have crystal in front of me at the moment and so apologize for any errors in syntax or typos.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top