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!

Formulas Across Subreports

Status
Not open for further replies.

Bonediggler

Technical User
Sep 20, 2007
19
US
Hello-

I am wondering if there is an easy way to build a formula field in one subreport which uses fields from two other subreports.


Thanks for the help!

 
Define "easy". The subreports would need to be in different report sections, e.g., GF_a, GF_b,GF_c, or at least the report receiving the two fields must be in a section below the others. In each donating sub, you must set up the field as a shared variable, as in:

whileprintingrecords;
shared numbervar x := sum({table.qty});

This must be placed on the subreport in the report footer. Repeat in the second donating sub, naming the variable something else, like "y".

Then in the receiving sub, create a formula like this:

whileprintingrecords;
shared numbervar x;
shared numbervar y;
x + y + sum({table.amt})

-LB
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top