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 TouchToneTommy on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

suppress header

Status
Not open for further replies.

sondev

IS-IT--Management
Jan 7, 2005
22
How do i suppress a header based on the fact that the page is only showing content for the footer. I have a main report and a sub-report. When just information from the sub-report is being displayed on a page, I would like to remove the header (particualry page header 'C'. Please advise.
 
If you want a solution that works in your environment, you have to provide more technical information such as

Crystal Version
Database and connectivity
Sample input data
Expected output
Formulas involved

In your case, what's in Page Header A and B?
Where's the subreport?

There's too many unknowns to provide any adequate solutions
 
I see. Well in this case, my crystal version is 10.0. I have nothing in page header A. For some reason, Informatin in page header A does not display on the first page. So i have to put the content on page header 'b'. The name of the Client is in Page Header B. In page header 'C', I would like to put column names for a table. These column names consistently show up throughout the report so the user can follow through the report. But I do not want this page header 'c' to display when the sub-report is displaying information at the top of the page. The reason being is that the sub-report has no correlation to the column names in page header 'c'. After the sub-report is displayed, the main report begins to redisplay on a new page or 'next' page. This main report is grouped by Client.

Group Header #1: txtClientName
Group Footer #1: txtClientName (contains the subreport)

Hope this helps. thanks.
 
For the last page, you can check pagenumber = totalpagecount, supressing the page header using this formula.

If you just want to suppress when there are no detail records, then do a simple count on some detail field. You can then do the comparison recordnumber = YourCount

I'm on Crystal 8.5, so there may be some better way to do it in Crystal 10.



[yinyang] Madawc Williams (East Anglia, UK) [yinyang]
 
Please see thread767-938969. Assuming you have the subreport in a group footer section, you would want to place {@true} in the group header section and {@false} in the group footer section containing the subreport.

-LB
 
lbass,

the link really helped out. I used your booleanvar; true, false conditions to effectively show the right page header for the right report (Main/sub report). For some reason, the booleanvar flag does not work inside the sub-report. I was hoping to suppress the page header of the sub-report for certain sections in the subreport. Unfortunately, I am not sure how I can accomplish this. Any help would be great. thanks

soni
 
Are you saying you have a page header in the main report that you want suppressed depending upon the section of the subreport, or are you saying you have a page header within the subreport that you want suppressed depending upon the section within the subreport? If the latter, is the page header in the subreport based on a faux group within the subreport?

-LB
 
I have two page headers in my main report. I used the booleanvar flags to display one page header for my main report, and it displays my 2nd page header for the sub report. Now, there are instances where i do not need the 2nd page header to display for my sub-report. It depends on the group #. To be more precise, I do not want the page header to display if the next page begins with group header #2 in the sub-report. How can I suppress the page header of a subreport based on conditions in the main report. I tried using the booleanvar conditions (true/false), but they will not work in this case because I will need to suppress both page headers for group header #2 in my sub-report. In any case, i dont think they work in the sub-report. please advise.
 
I think you are better off controlling the page headers by creating them within the subreport. Create a formula {@all} within the subreport that includes all records as in:

{table.ID} > 0

Then insert a group on {@all} and format it to "repeat group headers on each page". Place your page header fields in this group header, after removing the group name. Next go to the section expert->group header (all)->suppress->x+2 and enter:

{table.group#2field} <> previous({table.group#2field})

This will suppress the faux page header whenever a new group #2 field starts a subreport page.

You would use the flag method in the main report to suppress all page headers when the subreport fires.

-LB
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top