Problem: I want to suppress the DetailsSection 4 and 5 if there are no records in Subreports in them.So the problem is that I can supress them if they are no rows in the table of that subreport. but when there are rows , I see that the report is so big and repeating itself many times. I can see the report with all the sections repeating again and again when there is data.
I have a Crystal report with 5 Subreports as follows.
- reportHeader
- PageHeader
- DetailsSection1(Subreport1 Here)
- DetailsSection2(Subreport2 Here)
- DetailsSection3(Subreport3 Here)
- DetailsSection4(ApplicantInformation Here)
- DetailsSection5(CBInformation Here)
- PageFooter
- ReportFooter
The steps I followed are :
Step:1 (Collected the total records of table ApplicantInformation in this shared var)
Create a shared Variable AppInfoCount with the following content in the formula
WhilePrintingRecords;
Shared NumberVar AppCount;
AppCount := count({ApplicantInformation.DirectionID});
""
Step 2 :Used this variable for suppressing the detailsection4 in the Main report.
So In the Section Expert-->DetailSection4-->
under Supress(No Drill-down)(x-2) I gave the formula
WhilePrintingRecords;
Shared NumberVar AppCount;
if( AppCount= 0 ) then True else false;
I did all this in the Main report and not sub report. Is there something that I am missing? please help and thanks for those active helpers.
Regards, Chandanan.