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

Supress Page Header when subreport starts 1

Status
Not open for further replies.

magicmonkey1

Programmer
Mar 15, 2007
10
US
Hi Experts,
I have two subreports in a main report.I am using inbuilt Crystal report of VS2005.

Problem is, I want to supress the page header of main report in subreports.

Please suggest.
 
You need to specify what report sections the subreports are in.

-LB
 
Thanks for responsing...
SubReport a is in Report Footer a
and Sub Report b is in Report Footer b.

Thank you
 
If you have "new page before" set on RH_a, you could just go to the section expert->page header->suppress->x+2 and enter:

onlastrecord

The only potential problem with this is if you have one orphaned detail row on your last page of the main report--the page header would be removed here, also. Please see my last (?) post in thread767-1345144 for another method. In your case, you would place {@true1} in RH_a and you would set the page header to suppress using this formula:

whileprintingrecords;
booleanvar flag1;
flag1 = true //note no colon

-LB
 
Thank you very much for you help.
It helped me.

Thanks again...
 
Hi Experts,
Thanks for your previous help.
Could you please help me further?

Design of report is like below :
My report contains 1 subreport placed in Report Footer

Now my problem is that i dont want to show the pageheader and detail section of main report if there are no records
i.e. supress detail section and Page Header if recordcount = 0
and vice versa in subreports
if there are no records in subreport dont show the page header(Note: in subreport i have created fakepageheader) and details section.


Please suggest something...
Thank you
 
Try using conditional suppression on the page header sections using a formula like this:

isnull({table.somerecurringfield})

-LB
 
Hello Experts,
Please help me again.
I have tried your method for suppressing page header which you have suggested me before, but i dont know it is not working for me now.
I have two subreports placed in RH_a and RH_b. I want to suppress Page Header in Subreports.
I created one formula @true1 as
whileprintingrecords;
booleanvar flag1= true;
and placed @true1 in RH_a

Then I suppressed PH using following
whileprintingrecords;
booleanvar flag1;
flag1 = true

But Page Header dont get suppressed in the subreports.
Please Help me again.
 
There are no page headers in subreports, so did you create fake page headers? There are also no page headers in the main report on report header pages, so I'm not sure what exactly you are doing or what it is you want to suppress.

-LB
 
Thanks for responding,
I have created fakepageheaders in the subreports
and I want to suppress main report's page header in the subreports.
 
So are your subreports really in the report footer? Because as I said, there are no page headers on report header pages.

I just noticed that your formula is incorrect. Please use the following for {@true1}:

whileprintingrecords;
booleanvar flag1 := true; //Note that you need the colon here. The same is true of the false formula.

-LB
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top