Report Design
 Crystal Reports Forum : Crystal Reports 9 through 2022 : Report Design
Message Icon Topic: Printing Dynamic Page header Post Reply Post New Topic
Author Message
Jagaveera
Newbie
Newbie
Avatar

Joined: 11 Jun 2009
Location: India
Online Status: Offline
Posts: 18
Quote Jagaveera Replybullet Topic: Printing Dynamic Page header
     Posted: 12 Oct 2009 at 8:40am
Hi all,
 
I hav a report with 9 subreports. I need to display a page header for the first 4 subreports and a different page header for the last 4 subreports leaving the page header for the subreport 5 as blank. The pages are not fixed and may vary according to the amount of data. Could anyone help me on this?
IP IP Logged
hilfy
Admin Group
Admin Group
Avatar

Joined: 20 Nov 2006
Online Status: Offline
Posts: 3702
Quote hilfy Replybullet Posted: 12 Oct 2009 at 1:52pm
Don't put the page header in the main report.  Instead, create an outside group for each subreport such that there is only one item in the group.  Set the group up so that the header repeats on every page.
 
For example, the data for most of our reports is extracted in a batch process, so the Job_ID for the batch is one of the fields in the reporting tables.  Records are then filtered on a single Job_ID in the main report and subreports are linked based on that Job_ID.  For this type of thing, I then use an outermost group of Job_ID in the subreport in order to get page headers.  You could simulate this creating a formula that contains a constant and then grouping on the formula.
 
You'll have to set up the header in each of the subreports that need it, but it should give you what you're looking for.
 
-Dell
IP IP Logged
Jagaveera
Newbie
Newbie
Avatar

Joined: 11 Jun 2009
Location: India
Online Status: Offline
Posts: 18
Quote Jagaveera Replybullet Posted: 13 Oct 2009 at 7:06am
Hi Hilfy,
 
Thanks for your suggestion. But i need to bring in a fielddata in the Header of each page which is available in the Query corresponding to the main report. It is not available in many of the subreports. So placing in the subreports will not solve my problem.
If you have any other idea kindly share it with me.
IP IP Logged
DBlank
Moderator
Moderator


Joined: 19 Dec 2008
Online Status: Offline
Posts: 9053
Quote DBlank Replybullet Posted: 13 Oct 2009 at 7:23am
I believe that Hilfy was not suggesting putting the page headers in the sub reports but rather not using the page header at all but instead using multiple group headers in the main report.
You can then create as many groups as you need with different headers. YOu can set the GH to repeat on each page.
Just group on a dat field that is the same for each row in them main report or group on a formula field that is just a string over and over.
G1 - mimic page header 1 here
Subreport1
G2 - mimic page header 2 here
Subreport2
G3 - mimic page header 3 here
Subreport3
etc.


Edited by DBlank - 13 Oct 2009 at 7:27am
IP IP Logged
hilfy
Admin Group
Admin Group
Avatar

Joined: 20 Nov 2006
Online Status: Offline
Posts: 3702
Quote hilfy Replybullet Posted: 13 Oct 2009 at 7:57am
No, I was actually suggesting to use the group headers in the subreports to simulate page headers.
 
How much data needs to come into the header from the main report?  One of the ways that I have used to get that kind of thing into the subreport is by manipulating the subreport links like this:
 
1.  Create a subreport link on each field that you want to have appear in the page header of the subreport that doesn't exist in the subreport data. 
 
2.  In the subreport, go to the Select Expert and delete all of the references to the links that you just added.
 
What this does is create parameters in the subreport that will automatically fill with data from the main report.  You then put the parameters in the group header in the subreport to get your page header.
 
-Dell
IP IP Logged
DBlank
Moderator
Moderator


Joined: 19 Dec 2008
Online Status: Offline
Posts: 9053
Quote DBlank Replybullet Posted: 13 Oct 2009 at 8:15am
Hmmm,
I would have done it the other way with group headers on the main report hence my reading into your answer incorrectly.
Thanks for clarifying.
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