Technical Questions
 Crystal Reports Forum : Crystal Reports 9 through 2022 : Technical Questions
Message Icon Topic: Repeat Header for Subreport Post Reply Post New Topic
Author Message
Elisha83
Groupie
Groupie


Joined: 19 Feb 2008
Location: Malaysia
Online Status: Offline
Posts: 62
Quote Elisha83 Replybullet Topic: Repeat Header for Subreport
     Posted: 29 May 2009 at 2:14am
Hi there~
 
I need a guidance on how to make a header to repeat on each page of the subreport during the report generation. For the time being, I put the header on the Report Header as there is no Page Header in the subreport.
 
Can anyone tell me what can I do in order to achieve this results?
 
 
Please advice~
 
 
 
 
Thanks & Regards,
Eli Smile
3Lish@
IP IP Logged
lockwelle
Moderator
Moderator


Joined: 21 Dec 2007
Online Status: Offline
Posts: 4374
Quote lockwelle Replybullet Posted: 29 May 2009 at 6:32am
if you know when the subreport is to fire, you might try changing the page header in your main report to match.
 
If your subreport is that long, it might profit you to use a stored proc and bring all your data together into a really large table, this way you can probably better program the report to appear correct.
 
I think that subreports were designed to be small, less than a page, which is why they only have a Report header section.
 
Just a guess.
IP IP Logged
Elisha83
Groupie
Groupie


Joined: 19 Feb 2008
Location: Malaysia
Online Status: Offline
Posts: 62
Quote Elisha83 Replybullet Posted: 31 May 2009 at 11:10pm

I cant put the header at the PH in main report as it is not the same header with the main report. My subreport only started to show after my main report footer Grand Total show.

Is there any other way I can do to achieve this? Please advice~
 
 
 
Thanks in advance..
 
 
 
 
 
 
Eli Smile
3Lish@
IP IP Logged
lockwelle
Moderator
Moderator


Joined: 21 Dec 2007
Online Status: Offline
Posts: 4374
Quote lockwelle Replybullet Posted: 01 Jun 2009 at 6:08am

you can have multiple page headers and conditionally suppress them.  If this is not an option, then the answer is no.  The functionality does not exist in Crystal.

IP IP Logged
Elisha83
Groupie
Groupie


Joined: 19 Feb 2008
Location: Malaysia
Online Status: Offline
Posts: 62
Quote Elisha83 Replybullet Posted: 01 Jun 2009 at 9:12am

Hmm..Ok..Lets say i put a header at PH A and another header at PH B. Header A is for main report and Header B for subreport.

Then how should i write for the coding in order to command the header B only appears once the subreport kicks in and at the same time Header A will be suppress? Can give me some example?
 
 
Sorry, cause Im still not too familiar with CR yet.
 
 
Please advice and thanks a lot~
 
 
 
Eli Smile
3Lish@
IP IP Logged
lockwelle
Moderator
Moderator


Joined: 21 Dec 2007
Online Status: Offline
Posts: 4374
Quote lockwelle Replybullet Posted: 02 Jun 2009 at 6:27am
create a suppression formula.
 
one would be like subreportflag=1 and the other would be subreportflag<>1, they would alternately be displayed.  create another formula, probably put it in the report footer and say subreportflag=1 or maybe in the details with a condition like OnLastRecord then subreportflag=1
 
oh, yeah, you would probably want to make the subreportflag a shared variable.  They are easy...look at other posts or Crystal Help.
 
HTH
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