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

Pass Variable from Sub to Main??

Status
Not open for further replies.

strom99

MIS
Nov 28, 2000
126
US
Hello

I am trying to pass a Shared NumberVar from a subreport to my main report and am having some problems.

Subreport:

Shared NumberVar prodvalue :=
Sum ({Query.AMT}, {Query.PROD_DESC8})

I then place this field in the Group Header #1 of the subreport.

Next I created a formula field with the following
Shared NumberVar prodvalue;

I placed this formula field in the Group Header #2 and split the header into 2 sections and place the subreport in the B section. All I get back is 0's.

I must be missing something somewhere. I did not create a link?? I have grouped both reports on PROD_HRCY_DESC8.

Using 8.5

Thanks for the help.




 
The formula you use to display the result in your main report must be placed (in the designer) in a section lower than the section the subreport is in. This is to ensure that the subreport has created a value for your shared variable when you print it on the main report. Malcolm Wynden
I'm for sale at malcolm@wynden.net
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top