Technical Questions
 Crystal Reports Forum : Crystal Reports 9 through 2022 : Technical Questions
Message Icon Topic: Remove Sub Report header in crystal report 2008 Post Reply Post New Topic
Author Message
k.krishna
Newbie
Newbie


Joined: 25 May 2009
Online Status: Offline
Posts: 2
Quote k.krishna Replybullet Topic: Remove Sub Report header in crystal report 2008
     Posted: 25 May 2009 at 1:47am
Hi all,
I am new to crystal report 2008. I've been trying to remove a page header from the sub report for some days now, but i cant. On preview, the subreport which appears on the last page has the page header of the main report appearing on top. I found a solution which is counting group number and locating the group number of the sub report .Then, i assigned this group number in the Suppress formula box for page header. It removes the page header on the sub report form, but my boss says its not the rite solution Confused, since if the sub report is more than 2 pages, the header will appear again..
So, if anyone could help..

Cheers




Edited by k.krishna - 25 May 2009 at 1:48am
krishna
IP IP Logged
lockwelle
Moderator
Moderator


Joined: 21 Dec 2007
Online Status: Offline
Posts: 4374
Quote lockwelle Replybullet Posted: 26 May 2009 at 6:43am
sounds like you want to remove the page header from the main report that uses a subreport, you want to get rid of page header in a subreport, just suppress it in the subreport...you don't need to display anything you don't want to from a subreport.
 
If you want to suppress the main report's page header that is much more difficult, and honestly I don't know where to start...well, I would try having the subreport set a shared variable and in the main report, if the variable has a certain value, I would suppress the page header...that is what I would try.  Maybe someone else has a better solution.
 
IP IP Logged
k.krishna
Newbie
Newbie


Joined: 25 May 2009
Online Status: Offline
Posts: 2
Quote k.krishna Replybullet Posted: 27 May 2009 at 3:58am
Hi,
Yes, i want to remove the main report's page header from my subreport. Actually, the subreport is displayed on a new page, but on top of the page, the main report's page header appears. And yes, i think we shoud use global variables,and use conditions. But i dunno where the global variables should be declared and all..
krishna
IP IP Logged
lockwelle
Moderator
Moderator


Joined: 21 Dec 2007
Online Status: Offline
Posts: 4374
Quote lockwelle Replybullet Posted: 27 May 2009 at 6:15am
if you are using subreports, go with shared variables, this will allow the subreport and the main report to access them.
 
declaring a variable is easy, just use it in a formula with a declaration:
shared numbervar nameOfVar;
 
If you know when your subreport is to print, I would check this condition and suppress the header.  Another idea would be to create a second page header section, put in on top of the actual page header.  Put your checking and a flag in there.  When your subreport is done, have it change the flag so that the page headers come back.  You can suppress the second page header section so that no one sees it.
 
It's an idea.  Hope it helps
 
 
IP IP Logged
Printable version Printable version

Forum Jump
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot delete your posts in this forum
You cannot edit your posts in this forum
You cannot create polls in this forum
You cannot vote in polls in this forum