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!

Passing Subreport Date to Main Report Page Footer 1

Status
Not open for further replies.
Feb 9, 2009
77
US
I am attempting to pass a message from a few subreports into the page footer of my main report. The subreports are placed in the report footers of the main report. The formula that is placed in the group header of the subreport is:

whileprintingrecords;
shared stringvar message;
message := 'accrual';

The formula in the page footer of the main report is:

whileprintingrecords;
shared stringvar message;
message;

When I run the report, the message only appears in the page footer on the last page of the subreport. I placed the subreports in the report header section of the main report, and it appears I am getting the same problem. Any ideas?
 
A shared variable will only pass after the subreport has fully executed (after the last page). Since you are hard coding the message, why not just place the text directly in the main report page footer section? If the issue is that you only want to appear in the page footer when the subreport displays, you can use formulas as follows. Create two formulas:

Place the following in the section containing the subreport:
//{@false}:
whileprintingrecords;
booleanvar flag := false;

Place the following in the report header (above the section containing the sub if any) AND in the section following the one containing the sub:
//{@true}:
whileprintingrecords;
booleanvar flag := true;

Then right click on the text object->format field->suppress->x+2 and enter:

whileprintingrecords;
booleanvar flag;
flag = true; //note no colon

-LB
 
Yea, I figured that out after I posted the question and did something similar to what you wrote. Thanks again for your help!
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top