Print Page | Close Window

Hide (suppress) Page Header Section, conditionally

Printed From: Crystal Reports Book
Category: Crystal Reports 9 through 2020
Forum Name: Technical Questions
Forum Discription: Formulas, charting data, Crystal syntax, etc.
URL: http://www.crystalreportsbook.com/forum/forum_posts.asp?TID=8153
Printed Date: 08 May 2024 at 12:46am


Topic: Hide (suppress) Page Header Section, conditionally
Posted By: sajhak
Subject: Hide (suppress) Page Header Section, conditionally
Date Posted: 28 Oct 2009 at 3:00pm
Hi all,

in my CR , im having a "page header" section and a "details" section ..

The problem im having is, this page header is repeating for each and every case, which is not the way i needed.
What i exactly need is, to display the header section, only if items are available in details section ..

Please reply me , its an urgent one..

Thanks in advance
Saj



Replies:
Posted By: sajhak
Date Posted: 05 Nov 2009 at 11:20am
Any ideaa???? :( :(       


Posted By: FrnhtGLI
Date Posted: 05 Nov 2009 at 11:36am

So are you just wanting a blank page if there are no details?

Is your report grouped in any specific way?
 
I'm going to write this and assume that you are grouped and that you want to show a blank page for the group if there are no details.
 
Use the sum function and create a COUNT of one of the fields in the details section. Insert this into Group1. Conditionally suppress the page header if the SUMFIELD=0.
 
This may not completely get you what you're asking for but maybe it will give you an idea.
 
If you explain a bit more maybe I could help more specifically.


Posted By: sajhak
Date Posted: 05 Nov 2009 at 12:37pm
Thanks FrnhtGLI for your reply,

actually what i need is, i need to avoid displaying the header if there are no details in the details section .. currently the header(column header) is displayed in every page even though data is available or not..


To understand more easily i have drawn a sample .. as shown below , even if there is no data to be displayed in the 2nd page, still the table columns appear , which is the case i need to avoid.. here i have put those table columns into the header section of my CR. ..


(Page 1)
Name      Age     Sex     Status     City
AAA     23     male     Single     CCC
BBB     24     Male     Married     III
CCC     43     Female     Married     RRR
DDD     33     Female     Married     TTT
AAA     23     male     Single     CCC
BBB     24     Male     Married     III
CCC     43     Female     Married     RRR
DDD     33     Female     Married     TTT




( Page 2 )
Name      Age     Sex     Status     City
                    

// No data to display in this page, but still the column
header appears ..


Thanks


Posted By: FrnhtGLI
Date Posted: 06 Nov 2009 at 5:07am

So then Page1 should be the only page and Page2 is printing for some unknown reason?

Try going into the section expert and checking suppress blank section.

 
It also may possibly be extra sections on the report (group footers, page footer, report footer) that can't fit on the first page and are forcing the second page to print to fit them. Try tightening up any sections or even suppressing them. Also, if Page2 is the last page of the report and you still need the page, go into the section expert, make sure the page header section is open, go into the suppress formula editor and type:
 
pagenumber=totalpagecount
 
That will suppress the header if it is flowing over to the last page of the report.



Print Page | Close Window