We help IT Professionals succeed at work.

We've partnered with Certified Experts, Carl Webster and Richard Faulkner, to bring you two Citrix podcasts. Learn about 2020 trends and get answers to your biggest Citrix questions!Listen Now


suppress main reports page header

zafridi asked
Medium Priority
Last Modified: 2012-06-27
I have a sub report inside another report and the headings on the main report are page headings. When i preview the report it shows both the reports fine but on the sub report im seeing the main reports page headers. how can i get rid of main reports page headers from the sub reports. I just wana be able to see the sub-reports headers and data. thanks
Watch Question

You'll need to use conditional suppression to suppress them while the subreport is printing.

Create a new formula and put it in the section above your subreport (you may want to add a blank report section containing nothing but this formula):

shared numberVar HideHeaders := 1;

Create a new formula and put it in your main report's report header:

shared numberVar HideHeaders := 0;

Create a new formula and put it in the section below your subreport:
shared numberVar HideHeaders := 0;

Now use Section Expert and for the page header, click the formula (X+2) button next to 'Suppress' and enter this formula there:
(shared numberVar HideHeaders = 1)

This will suppress the page header while the subreport is printing.  Note that unless you do a page break before the subreport, the page header will still print on the first page of the subreport but not on any subsequent pages.




thanks for ur help. my only problem is now that it doesn't display the page headers for the sub report after the first page and plus the second sub report is not coming out as i want it, it is still showing the main reports page headers. do i need to repeat the same thing for the second sub report or i need to try someting else. thanks for ur help.

Yes, for the 2nd subreport you can follow the same process - or if they're adjacent just move the second formula below the second report instead of below the first report.

>>> now that it doesn't display the page headers for the sub report after the first page

I thought this was what you wanted - maybe I misunderstood?


i meant to say the subreports's own page headers. its something like this

main report (all of its own page headers) then comes the subreport1(all of its own page headers on all pages) then subreport2(all of its own page headers)..thanks

A subreport will never print it's own page headers - that's the way Crystal works - because otherwise you could potentially have two page headers (main report and subreport) and Crystal can't handle that.

What you can do if you want, is create a second page header in your main report and then use conditional suppression on the second one so that it appears only when the subreport is printing - the opposite of what we already did with the first page header.  All you need to do is edit the suppression formula in the section expert for the second header and use the opposite formula so it would be:

   (shared numberVar HideHeaders = 1)

You can also create a third page header to show on your second report if necessary, but that's going to be more complicated overall.


it actually works but it shows it on the main report as well. is there a way that i can suppress it on the main report because all my sub reports have different page headers and also can i use the same formula with other subreport page headers as well. would it work? thanks
Sorry, change the suppression formula for the second headers to be =0 instead of =1 -- that's what I meant to say the first time.

Not the solution you were looking for? Getting a personalized solution is easy.

Ask the Experts


thanks..i just noticed the page headers of the main report on the last page of the report. do u know why am i getting that. its just the headers after the last page of the entire report no data or anything. thanks


k no problem i got it...i got rid of it.

Glad I could help.
Mike McCrackenSenior Consultant
Most Valuable Expert 2011
Top Expert 2013

There is a trick you can use to simulate page header and footers in a subreport.




hey frodoman,

since i have more than one subreport how do i apply that some formula to other subreports page headings.
for instance i have schedule 1 as main report then i have schedule2 as subreport1 and schedule3 as subreport2. Right now i have subreport1 page headings displaying on subreport1 but they move over to subreport3 and plus i need to show sub report3 page headings. sorry for being a pain..

You can use the same concept, but you'll need to take a different approach with the shared variable and conditional suppression.

Say set the variable to 0 at the beginning of the main report and suppress the first header when this is <> 0.  Set the variable to 1 before the first subreport and suppress the next header whenever the variable is <> 1.  Set the variable to 2 before the second subreport, etc., etc.

It's the same concept, just takes more attention to manage correctly.


could u plz simplify it a little more..i keep playing with it sometimes it shows one subreport fine and the other one is messed up..im not quite following the logic i guess. here is the sequence i have so far..main report (PHa, PHb, PHc),Detail, Rfa,Rfb,Rfc..PHa is for main report header which is fine..PHb supposed to show on RFb(subreport1), PHc shud show on RFc(subreroprt2)..thanks for ur help

>>> PHb supposed to show on RFb(subreport1)

If you mean PHb within the subreport, then keep in mind that Crystal does not ever show the page headers/footers of a subreport.


i mean i inserted new page header sections in the main report as(PHa, PHb, PHc), Pha is a header for the main report while PHb and PHc are the headers (inside the main report) that i wana show on the subreport1 and 2 respectively as page headers. is that possible?

I have applied the same procedure but it is not working.
Access more of Experts Exchange with a free account
Thanks for using Experts Exchange.

Create a free account to continue.

Limited access with a free account allows you to:

  • View three pieces of content (articles, solutions, posts, and videos)
  • Ask the experts questions (counted toward content limit)
  • Customize your dashboard and profile

*This site is protected by reCAPTCHA and the Google Privacy Policy and Terms of Service apply.


Please enter a first name

Please enter a last name

8+ characters (letters, numbers, and a symbol)

By clicking, you agree to the Terms of Use and Privacy Policy.