Reader Level:
Articles

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

By Mahesh Chand on October 09, 2006
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.
  • 0
  • 0
  • 121174

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.

Mahesh Chand

Mahesh Chand is founder of C# Corner. C# Corner founded in 1999 is a FREE member contributions based open platform for developers to solve problems, learn new technology and hang out.  Mahesh has been awar... Read more

COMMENT USING

Trending up