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!

subreport page footer

Status
Not open for further replies.

wiplash

MIS
Jun 29, 2004
99
US
How can I insert a page footer on a subreport? We're using Crystal Reports 11 and I understand Crystal Reports doesn't support this per say, but is there a work around to get a line of text to appear at the bottom of each page?
Thank you.
 
by the way, I neglected to specifically mention that the "footer" HAS to appear on each page, not just when the group breaks. I'm currently using the "fake" group to print the header on each page, but this may not print the page footer on each page.
Thanks again.
 
You can use the page footer in the main report and adjust some value so that it is different when the subreoprt is being printed. You could use a Variable for that and set it in the section above the section with the subreport.

[yinyang] Madawc Williams (East Anglia, UK). Using Crystal 11.5 with SQL and Windows XP [yinyang]
 
That works but I neglected to mention that I have multiple subreports in the main report and only want that footer to appear in that specific subreport only.

I have a parameter in the main report I can use with a new formula, but that parameter allows the user to select any report or all reports. If the user selects just that particular report, then we're good, however if the user selects to run them all, that footer prints on all. Not sure how to resolve this.
 
You could set a variable in the same section as the subreport. But the method is imperfect: I could never get it to fully work in Crystal 10.

[yinyang] Madawc Williams (East Anglia, UK). Using Crystal 11.5 with SQL and Windows XP [yinyang]
 
Create two formulas:

//{@true} to be placed in the section containing the subreport that requires the special page footer:

whileprintingrecords;
booleanvar flag := true;

//{@false} to be placed in the section immediately after the one containing the specific subreport, e.g., if the sub is in GF#1, place this in the corresponding group header, GH#1 (the next section that will print, if it exists) and the Report Footer (the next section after the last group):

whileprintingrecords;
booleanvar flag := false;

Set up Page Footer_a for the rest of the report, and then set up Page Footer_b for the specific sub. In the section expert->Page Footer_a->suppress->x+2 and enter:

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

Then select Page Footer_b->suppress->x+2 and enter:
whileprintingrecords;
booleanvar flag;
flag = false;//note no colon

-LB
 
Thanks much but I don't think I follow. I created the two formulas as stated but not sure what goes where.

Please allow me to give an example of my specific report and possibly your response will make more sense to me.

Main report in order by section:

1. report header: suppressed
2. page header: suppressed
3. details: suppressed
4. report footer a: contains subreport a
5. report footer b: contains subreport b
6. report footer c: contains subreport c
7. report footer d: contains subreport d
8. page footer: currently suppressed


Subreport b is where I'm attempting to have a line of text appear at the bottom of every page ... a page footer if you will.

Can you clarify what goes where?

Thank you
 
Put {@True} in RF_b and put {@false} in the Report Header AND in RF_c.

-LB
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top