on 07-23-2008 9:04 AM
I have a sub report in the Report Footer of the main report. I have selected to suppress the subreport when it is empty.
But, I have a formula in the details section of the subreport which calculates the item number:
WhilePrintingRecords;
Shared Numbervar x;
x:= x + 1;
So, even when there is no data being inputed into the subreport, it still shows up. What would be the best way to supress the sub report when it is empty?
I can think of a couple of options but I don't know how to write formulae for them:
1. The sub report contains a field in the details section called DRAW_NO. So, supress the sup report when there are no entries in this field.
2. Leave the item number blank when there are no entries in the field DRAW_NO.
If anyone can tell me roughly what the formula should look like then I would be very grateful. Or, if you have another suggestion for supressing the sub report when it is empty.
Try just modifying your existing formula;
WhilePrintingRecords;
Shared Numbervar x;
if count() > 0 then x:= x + 1;
If there are no records returned then the count will be 0 and no value assigned to the shared variable, thus the blank subreport can be suppressed
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
There is an option in the section expert called suppress blank sections, check that and see if it works
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
83 | |
10 | |
10 | |
9 | |
7 | |
6 | |
5 | |
5 | |
4 | |
3 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.