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

Is it Possible to....

Status
Not open for further replies.

Snookless

Technical User
Mar 17, 2003
34
BR
.......get grand totals from a sub report onto the main report, then how to use those fields in an expression to subtract one from the other.
Thank you all..
Snookless
 
In the sub reoprt, you have to use type the folling:

Shared numberVar intX;
intX:= sum({field}]); instead of just use grand sum

Afterwards, in the main report, you have to tyep the following:

Shared numberVar intX;
intX

You can display the Grand total of the sub report in this way as long as the session that contains formula field in the main report is placed underneath the session that contains the sub report.
 
Rememebr to put your formula in the subreport to get it to save the variable.

And you might need to have a formula in the main report (same section as subreport) to
Shared numberVar intX:=0;

To set the shared variable to 0 in case the subreport finds no data.

Editor and Publisher of Crystal Clear
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top