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!

Problem in using shared variables URGENT

Status
Not open for further replies.

manjyo

Programmer
Jul 2, 2003
15
IN
hi
i m facing a problem in sharing the values between a main report and subreport. i m creating a shared boolean variable in the main report header and resetting the value in the page header section of the main report to true. i put the sub report in the detail section of the main report and calling it according to some condition. in the sub report i m having one group with two sections. and the group heade will repeat in each page. in the section a(group) of the sub report i m checking the value of the shared variable from main report and in the section b i m setting it as false. but when i run the report in the sub report section a its taking only the false value. ie its not setting it in the page header of the main report.

thanks in advance

manoj
 
Do you have "whileprintingrecords;" in the line before you
declare the variable?

Something like this:
{Pageheader}
whileprintingrecords;
shared BooleanVar FlagGood := True;

{subreport section one, formula to display}
whileprintingrecords;
shared BooleanVar FlagGood; //just shows FlagGood.

{subreport section two, formula to reset}
whileprintingrecords;
shared BooleanVar FlagGood:= False;

Scotto the Unwise
 
Why are you resetting the value in the page header of the main?

Place it in the report header of the main, if you need it reset at a different granularity in the main, you should have a group header.

-k



 
The question is: When do you want the Boolean shared variable reset?? After each running of the subreport??
As it stands it is resetting only after a new page.

If you want it reset after the running of the subreport, create a subsection after the subreport (suppress the subsection) and place your reset formula there.

Jim Broadbent
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top