Hello Friends,
I am using Crystal Reports for Visual Studio 2010 and I have two reports. First is main report and second is subreport. The subreport is in the report footer of the main report. Now I need to hide/suppress pageheader section of main report when sub report starts. I tried solutions mentioned in following post, but I think I tried that wrongly.
http://scn.sap.com/thread/2046714
I posted my issue on that thread but did not get any reply, so I decided to post a new question.
Here are the steps and code which I used:
1) I created a formula field sample1:
code:
Shared booleanVar hide := false;
hide
2) My pageheader have 3 sections so I placed Sample1 to 1st section in PageHeader.
3) I created a formula field sample2:
code:
Shared booleanVar hide := true;
hide
4) I divided my ReportFooter in two parts:
In first part I placed Sample2 formula field
and in second part I inserted my subreport.
5) Then I moved to Section Expert and added below formula to Suppress (No Drill-Down) of my PageHeader sections.
Shared booleanVar hide;
hide;
Above solution is not working for me, please tell me if there is something wrong in my code. Also tell me if you have any other solution for my problem.
Please reply, I need help.
Thanks in advance.
Hi All,
It worked, I followed this post:
So here is the final solution which worked for me:
1) I created a formula field sample1:
code:
WhilePrintingRecords;
Shared booleanVar hide := false;
2) My pageheader have 3 sections so I placed Sample1 to 1st section in PageHeader.
3) I created a formula field sample2:
code:
WhilePrintingRecords;;
Shared booleanVar hide := true;
4) I divided my ReportFooter in two parts:
In first part I placed Sample2 formula field
and in second part I inserted my subreport.
5) Then I moved to Section Expert and added below formula to Suppress (No Drill-Down) of my PageHeader sections.
Shared booleanVar hide;