Tip: How to add a Page Header to a Sub Report in Crystal Reports?

Work around, work around, work around !!! This is what I do when I end up creating reports that require little bit of customization and there are times when you are tired of work arounds. Come on. Give me a break. Crystal Reports product costs so much and Business Objects folks seem to be adding patches to the old code. I would suggest them to rethink about it and rewrite the whole damn thing.

 

OK, I will stop being tetchy now. Let's get back to work.

 

Sub Reports in Crystal Reports do have report headers but do not support page headers. Wonder why? We can mimic the functionality with the help of a formula and a Group. Just follow these below steps:

 

Step 1: Create a Formula as following. I call my formula ShowPH:

 

WhileReadingRecords;

" "

 

Step 2: Add a Group from Insert Menu-select Group and you will see Insert Group. Select ShowPH formula there and click on Options tab.

 

SubRepPHImg1.gif

 

On Options tab, select "Repeat Group Header on Each Page".

 

SubRepPHImg2.gif

 

It will add a group to your sub report.

 

Step 3: Now add all text you want to display on the header of each page on the Group section area.

 

SubRepPHImg3.gif

 

Using these steps will add headers to the pages of a sub report.


Similar Articles
Mindcracker
Founded in 2003, Mindcracker is the authority in custom software development and innovation. We put best practices into action. We deliver solutions based on consumer and industry analysis.