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

Passing Parameters from Subreport CR8.5 1

Status
Not open for further replies.

Jillp

Technical User
Jun 7, 2001
75
0
0
US
I am trying to pass info from a subreport to the main report. I am creating shared variables in the sub (to store data) & main reports (to retrieve data). I have followed the BO "c2007600" article to a 'T'. It seems straight forward.

Often the variable is blank, this works fine until the first variable that contains data, then my report will repeat that data on all records until it reaches another populated variable, although the records should be blank.

I have attempted to reset the variable, by putting another formula in a section beneath. I am getting different but incorrect results.

There must be a simple step that I am missing.

I would welcome any input.

TIA,

Jill
 
Please identify in what report section the sub is located and in what report section you are referencing the shared variable in the main report. You either need a reset formula in the section immediately prior to the sub (e.g., GH1a if the sub is in GH1b, or a section following where the variable is referenced, e.g., in GH1d if it is referenced in GH1c.

-LB
 
My subreport is located in GH3a and my main report variable is located in GH3b.

I tried putting the reset formula in GHa as follows; WhilePrintingRecords; StringVar Main_User := " " and moving the subreport to GH3b, and the main report variable to GH3c. The results were exactly the same.
 
The variable must be identified as a shared variable of the same name in each formula:

WhilePrintingRecords;
[red]Shared[/red] StringVar Main_User := " ";

-LB
 
LB,

Thank you so much! Such a simple thing, but so important.

Thanks Again,

Jill
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top