Any option to change the Page Headers based on the parameters in Crystal Reports


  i have two sub reports in crystal . Based on the Parameters it will select the either sub report 1 or Sub Report 2. But here problem is both sub reports column headers are different. Now headers are displaying only for the Report Headers. where as if the user goes to second page of data , user will not be able to find the what data it is? because no headers are displaying .

Is there any way we can  change the column headers based on the parameters?

Who is Participating?

[Product update] Infrastructure Analysis Tool is now available with Business Accounts.Learn More

I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

Ido MilletProfessor of MIS at Penn State Erie and Owner, Millet SoftwareCommented:
Create a dummy grouping in the subreport based on a formula that returns a constant value (for example, " ").
Move the column headers to GH1, and turn on the option to repeat GH1 on each Page.

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
I believe that will resolve the issue.  If not please explain a bit more on the issue.

It may depend on what else is in your main report page header section, but another option may be to put the subreport column headings in the main report, with the headings for each subreport in a separate page header section.  Then you'd use the parameters to suppress one section or the other.

 It seems like that would work, although keeping the column headings in the subreports (as in Ido's suggestion) may be a bit simpler.

Why Diversity in Tech Matters

Kesha Williams, certified professional and software developer, explores the imbalance of diversity in the world of technology -- especially when it comes to hiring women. She showcases ways she's making a difference through the Colors of STEM program.

Ido MilletProfessor of MIS at Penn State Erie and Owner, Millet SoftwareCommented:
The advantage of using the dummy Group Heading technique within the subreport is that you can easily repeat the headers on subsequent pages.
Well, the main report page headers will also be repeated, of course, but I just realized that I was assuming that the subreport would run the length of the main report.  There was another recent question where someone (possibly the OP) seemed to be using subreports like that, so I just had that scenario in my head.  But if the main report is longer than the subreport, that could be a problem.

 So, yeah, your suggestion is looking better and better.  :-)

Maruthi Rao YarapathineniAuthor Commented:
Excellent Sir. Its working Nicely.
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Crystal Reports

From novice to tech pro — start learning today.