cancel
Showing results for 
Search instead for 
Did you mean: 

How to suppress Page Footer for a Subreport

Former Member
0 Kudos

Hi All,

I have a Crystal Report that I am using to generate variable data. In the main report I have 4 groups:

Report Header => Blank & Suppressed

Group Header 1

Group Header 2a,b,c,d,e,f,g

Group Header 3

Group Header 4a, b, c, d

Details => Blank & Suppressed

Group Footer 4 => Blank & Suppressed

Group Footer 3 => Blank & Suppressed

Group Footer 2 => Blank & Suppressed

Group Footer 1 => Blank & Suppressed

Report Footer => Blank & Suppressed

Page Footer a,b

Within the Group Header 1, I have a subreport that generates a overall summary of data for the main report. The main report has the detailed data.

The Group Header 1 is setup with: New Page After, Reset the page number after, Keep together, & Suppress Blank Section.

In the main report Page Footer b, I have a Page Number field that does Page X of XX.

The problem I have is I don't want the page footer to be printed for the Subreport. I want to suppress the page footer for any data of the subreport. Ionly want to print the page footer when the data from the main report is printed.

I cannot seem to work out a way to suppress the page footer just for the subreport data.
Any suggestions for this issue?

Thank you,

H.Patel

Accepted Solutions (1)

Accepted Solutions (1)

abhilash_kumar
Active Contributor
0 Kudos

Hi Hamal,

So, you're trying to suppress Page Footers on pages that print with a Subreport alone, are you?

Try this:

1) Create this formula and place it on the Group Header 2 Section:

whileprintingrecords;

numbervar x := x + 1;

"";

2) Create this formula and place it on the Page Header Section:

whileprintingrecords;

numbervar x := 0;

"";

3) Go to the Section Expert > Select the Page Footer Section > Click the formula button beside 'Suppress' and use this code:

numbervar x = 0;

Let me know how this goes.

-Abhilash

Former Member
0 Kudos

Hi Abhilash,

Thank you very much, that works perfectly.

H. Patel

Former Member
0 Kudos

Hi Abhilash,

It is me again, I have a new issue. The previous solution you provided worked very well; however, I found a bug where the subreport was not printing all the data I needed. So I had to move it down 1 level to Header 2a.

Now I need to suppress the page footer for the subreport in Header 2a but print it for the rest of the pages on the main report.

I have moved the formula you provided from Group Header 2 section to Group Header 2b section. The formula only suppresses the page footer for Page 1 but does not suppress it for other pages where the subreport has been printed.

Any help you can provide is greatly appreciated.

Thank you,

H. Patel

abhilash_kumar
Active Contributor
0 Kudos

Previously you said the Subreport was placed in Group Header 1 isn't it?

The first formula should be placed in the section that prints the Main Report data. Now that the Subreport is in Group Header 2, would that be Group Header 3 or maybe the Details Section?

-Abhilash

Former Member
0 Kudos

Hi Abhilash,

After I posted my issue & many tries I found a solution that works for me. Previously, I had the following:

GH1
GH2a,b,c,d,e,f,g

GH3

GH4a,b,c,d

The subreport was in GH1, however because it was in GH1; it did not get all the data we needed. So in terms of section I have this in the main report now.

GH1 => Suppressed Blank

GH2a,b,c,d,e,f,g,h => added 1 more section and moved the subreport from GH1 to GH2a

GH3

GH4a,b,c,d

Using the solution you provided; to make it work I did the following:

1) Create this formula and place it on the Group Header 2b Section:

whileprintingrecords;

numbervar x := x + 1;

"";

2) Create this formula and place it on the Page Header Section and also in Group Header 2a:

whileprintingrecords;

numbervar x := 0;

"";

3) Go to the Section Expert > Select the Page Footer Section > Click the formula button beside 'Suppress' and use this code:

numbervar x = 0;

This does the trick to suppress the page footer every time the subreport is printed from GH2a.

Thank you,

H.Patel

Answers (0)