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

Pass Main Report Value to Sub Report 1

Status
Not open for further replies.

tc3596

Technical User
Mar 16, 2001
283
Will shared variables work here? I've tried it but I can't seem to get it. I'm using 8.5. My sub report is in Group Footer 1. In my sub, if main value = x then suppress field in sub. Any thoughts?
 
You have to create the shared variable in the main report by creating a formula. For example:

whileprintingrecords;
shared numbervar x := sum({table.field},{table.group})

You must place this formula somewhere on the main report canvas and it must be placed in a section that in which the subreport is located.

Then in the subreport, you would click on the field you want conditionally suppressed->format field->common->suppress->x+2 and enter:

whileprintingrecords;
shared numbervar x;

x = 500 //assuming you want the field suppressed if it is this value.

-LB
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top