Reputation: 101
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.
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.
Upvotes: 1
Views: 885
Reputation: 52675
Rather than create detail sections for the ApplicantInformation
and CBInformation
sub reports create two more report footer sections. And put the sub reports there
Upvotes: 1