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.

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

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.

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

Manish PatatPosted Sep 24, 2020, 3:49 AM
I have created one Crystal Report with two Subreports. Here I included both the Subreports in the Detail Section. My first Subreport shows only Five row. second subreport has Five rows. So it displays in the second page not under the first subreport. If the both subreport has very few records(example. 5 rows) then the subreport is displaying in the first page. How to display the second subreport's records under the first subreport? Another issue is, My Header Section records are displaying in all the pages. From the second page onwards, I want to display only the subreport records. How to remove the Header section from the second page onwards? Is there any formula to do this? Thanks in Advance
Vivek ArzarePosted Nov 16, 2016, 2:43 AM
Hello Sir, I want print two copies of same record in crystal report . Just like duplicate copy
Shai BedarkarPosted Jun 17, 2013, 5:21 PM
Hi Mahesh, How do I do this such that for every new group I have one particular header which prints only once for the group and the for every subsequent page break I another smaller header. http://stackoverflow.com/questions/17143535/crystal-xi-conditional-print-of-sections-in-page-header
Shyju JosephPosted Feb 5, 2013, 3:25 PM
our company want to change its logo in crystal report header. we have 500 reports, do you know any script for that? thanks SJ
Mahesh ChandPosted Sep 1, 2012, 7:11 PM
Thank you Lori and other guys. Jeez .. Its been like 6 years since I touched Crystal Reports. I am finding Reports Viewer (Visual Studio) more flexible and easier to work with. No need to have too many work around for simple reports. Cheers!
LoriPosted Aug 31, 2012, 1:56 PM
This works great! Thank you for the work-around!
Venkatanaidu GullipallieditedPosted Aug 24, 2012, 12:18 PMEdited Aug 27, 2012, 12:27 AM
Hi Mahesh Chand, your idea works fine when sub-report contains 0 or 1 grouping only(no charts with drill-down). But i have a scenario ... "My report contains 2 groupings, chart with 2 levels of drill-down. while drilling-down i am able to show headers for 2 levels. but i am not able show headers while navigating when my sub-report contains data of more than 1 page"any tips please ...?
JohnPosted Jun 27, 2012, 12:44 PM
Great work-around! I am finding that to be a Crystal Reports developer, you need to be a master of work-arounds.
HarmeetPosted Mar 21, 2012, 11:56 AM
i want same report appear twice on one page. Like orignal And Duplicate Copy of Challan Details. Plz Help me,
Deon MeyerPosted Sep 1, 2011, 5:47 AM
I added the formula, and in the subreport when I try to add a group, the group option in the insert menu is greyed out. I'm using Crystal Reports in Visual Studio 2008 Pro. Any idea why? Thanks
Sankar NarayananeditedPosted Aug 10, 2011, 3:00 AMEdited Aug 10, 2011, 6:27 AM
Hi Mahesh, Your idea to create a dummy Page Header in a sub report is highly a useful technique which works for all cases. I am looking for a similar technique to create a Dummy Page footer in a sub report and make it repeat on all pages(For eg the Page Number). I tried adding another ShwPH group and made it to 'Print at the bottom of the page' and gave the functionality to Repeat the Header on all pages',But it does not work 100%.It prints the Page Number on the header as well. I also tried placing the Page Number field on another detail section and allowed it to print at the bottom of the page,but that still did not work as expected. Kindly post your comments which will be highlly helpful for everybody. Thanks in Advance !
Reinaldo SantosPosted Apr 18, 2011, 3:57 PM
how to do the same with crystal sub-reports using crosstab?
MaryPosted Apr 11, 2011, 7:30 PM
This helped so much!
Roopesh RekhawarPosted Feb 16, 2011, 3:12 AM
I have a requirement to print the pagewise totals on the Page Header and Page Footer. Currently,I am able to Print Pagewise totals in PageFooter but not in PageHeader. On the second page, pageHeader is getting the value of previous page footer. First page PageHeader is printing the value as Zero.Can anyone help me in fixing this issue. Thanks in advance.
Anulesh GuptaPosted Jun 10, 2010, 1:15 AM
Thanx once again this information was very useful for me Cheers
vaquas khanPosted Jan 2, 2010, 1:13 AM
I have these table CustomerMaster, Sales, Product_details I made a crystal report from these tables …like <o:p> </o:p> CustomerCode CustomerName TotalSales ProductName 11111001 rahul 230 Product1 122220 sam 452 product2 . . . . But I want my report look like that….. CustomerCode CustomerName TotalSales product1 product2 product3……… 11111001 rahul 230 122220 sam 452 . . Please help me….
mona brinegarPosted Jan 5, 2009, 9:02 AM
what is the formula for subreport footer?
TimPosted Nov 17, 2008, 12:54 PM
Is it possible to find out which report section is being printed and write formula to control the text to be printed in the page header for different pages? THX.
IanPosted Mar 25, 2008, 11:59 AM
Your solution to subreport page headers worked a treat. Except where the totals I'm displaying can't fit on the same page. They are printed on their own page, and the ShowPH group header isn't repeated. Any ideas on how to fix this?
viji malaPosted Dec 5, 2007, 4:54 AM
if the first page having two more sub sections(ie, page 1(a),1(b)).then how will print the title in the sub pages?
Rajeev RanjanPosted Nov 25, 2007, 11:39 PM
In my report the sub-report consists of the totals (based on grouping). Now if I simply implement the workaround suggested above then the headers will be coming twice on the same page (once as the normal report page header and second as the page header of the sub-report). How can I suppress the sub-report page header if the sub-report starts in the same page as the report? I hope I'm clear with the situation. TIA.
Xolile DyosiPosted Aug 13, 2007, 8:22 AM
Is it possible to use web services on WizCat,Libwin and PALS Information Management System? If not what recommended technology can be used?
Xolile DyosiPosted Aug 13, 2007, 8:20 AM
Is it possible to use web services on WizCat,Libwin and PALS Information Management System? If not what recommended technology can be used?
Roger LloveteditedPosted May 30, 2007, 6:06 AMEdited May 30, 2007, 10:19 AM
Hello, My name is Roger, I tried your steps and or i meesed up or i dint understood something or whatever but it doesn't seems to be what i need. Im using CR 8.5.0.217 I have a report with 3 subreports each one giving some totally different information from one to the other and only the Header of the main report has common information. I need to print a subreport header in each page this subreports needs Example TITLE A.- details main rep B.- subreport_1 b.0 Title Subreport_1 b.1 detail Subreport_1 C.- subreport_2 c.0 title subreport_2 c.1 detail Subreport_2 D.- subreport_3 d.0 title Subreport_3 d.1 detail Subreport_3 The page header involves TITLE + A (details main rep) The report detail involves the different subreports (B+C+D). I need this b.0 (Title Subreport_1) line at the top of each page the Subreport 1 is displaying. Do you have any idea about how to solve this? Thank you very much
Osvaldo PontesPosted May 20, 2007, 2:01 PM
hi from Brazil you got a great solution.. it solves my report mess... thanks a lot and keep up the great job OSVALDO
madhusudhan m yPosted Apr 9, 2007, 1:42 AM
I have a subreports in a srystal report, First subreport is having a data of 5 to 6 lines, 2 nd report has to print in continuation with 1st subreport. But now i getting printing 2nd page is new Page.