Learn how to a build a cloud-first strategyRegister Now

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 2680
  • Last Modified:

suppress main reports page header

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
0
zafridi
Asked:
zafridi
1 Solution
 
frodomanCommented:
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):

//@StartSuppression
shared numberVar HideHeaders := 1;

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

//@InitVariables
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.

HTH

frodoman
0
 
zafridiAuthor Commented:
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.
0
 
frodomanCommented:
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?
0
Free Tool: ZipGrep

ZipGrep is a utility that can list and search zip (.war, .ear, .jar, etc) archives for text patterns, without the need to extract the archive's contents.

One of a set of tools we're offering as a way to say thank you for being a part of the community.

 
zafridiAuthor Commented:
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
0
 
frodomanCommented:
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.
0
 
zafridiAuthor Commented:
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
0
 
frodomanCommented:
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.
0
 
zafridiAuthor Commented:
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
0
 
zafridiAuthor Commented:
k no problem i got it...i got rid of it.
0
 
frodomanCommented:
Glad I could help.
0
 
mlmccCommented:
There is a trick you can use to simulate page header and footers in a subreport.

http://support.businessobjects.com/library/kbase/articles/c2005103.asp

mlmcc
0
 
zafridiAuthor Commented:
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..
0
 
frodomanCommented:
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.
0
 
zafridiAuthor Commented:
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
0
 
frodomanCommented:
>>> 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.
0
 
zafridiAuthor Commented:
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?
0
 
rajusumCommented:
I have applied the same procedure but it is not working.
0

Featured Post

Hire Technology Freelancers with Gigs

Work with freelancers specializing in everything from database administration to programming, who have proven themselves as experts in their field. Hire the best, collaborate easily, pay securely, and get projects done right.

Tackle projects and never again get stuck behind a technical roadblock.
Join Now