How do I suppress a blank section on my report? I have tried suppressing with
if Count({MyVariable}) > 0 then false else true
and
IF {OnLastRecord} = "" AND pagenumber=TotalPageCount
THEN TRUE
ELSE FALSE
What am I missing? It is hiding the data but not the header. Another table is hiding the data and that is a very long Subreport that should be hidden if there is no value.
It almost seems like this is a bug. I've tried suppressing everything. Shouldn't suppress blank section work?
To suppress a blank section check the Suppress Blank Section. This just works.
If you want to suppress a section that contains a sub-report that seems to be empty, there are several places you can check:
make sure Suppress Blank Section is checked for the section that contains only your subreport (otherwise it wont be an empty section)
make sure Suppress Blank Subreport is checked in the Subreport section of Format Editor of the subreport
within the subreport (open the subreport to edit, double click from your main report) go to File | Report Options and check Suppress printing if no records. This will suppress your subreport when there are no records - even if you have static elements, like text in the subreport header etc.
I had this problem the issue was the section had a box in it so was never blank. I found it worked if I put the formula in the "Suppress (No Drill-Down)" option for the section instead of in the "Suppress Blank Section" option.
Related
I would like to display only 4 pages on my Crystal report, however, I am getting an extra empty page. I cannot pin the reason to what sounds like a trivial issue.
My report has the following:
- No fields in the main report - This is not avoidable.
- One sub-report.
- In order to have the sub-report header repeat I followed this method described here. (I just do not understand what the formula means and whether this is the reason for the extra page but I am getting a header as I require).
I am suppressing the pages in both the report and sub-report as follows: in the suppress I am using
if pagenumber>4 then true;
I tried to put in all my sections
Not(onLastRecord)
I am simply lost. All I need to do is print 4 pages only regardless how long the report/sub-report is. I also need the sub-report to have a repeating header. Thanks.
Try to reduce the size:
-If possible supress group and report footers
-Right Click on each section you can and select "Fit Section"
-Change the color of some sections so you can see if any responsible for the extra page
-Maybe the paper is set to letter ? : Go Design - Page Setup, set A4 or you can also try no printer to see if something changes ( this last one will change the format of your fields so backup before)
If you have any footer sections that are not being used, try suppressing them. This will remove empty white space that is added at the end of the report. Another option is to adjust the size of your top and bottom margins, providing there are no design conflicts in doing so.
If you have any white space at the bottom of the sections that appear at the end of the report you could also reduce the height of that section to remove the white space.
I have crystal reports XI, I am new to crystal reports and am not tech savvy, so please consider that in your reply. There is a section that does not populate at all when the value is zero. The whole section disappears on the generated reports. I need the section to show and I need the zero value to show. Any suggestions?
do a right click on that section(where the section name is), go to section expert and on the common tab see if you have something under Suppress(No drill-down) X-2 button(might be red). There should be a condition that is suppressing the section when the field takes 0 value. You can suppress that condition putting // in-front on it or just delete it. You may also check if Suppress Blank Section is checked, if so remove the check mark.
I have tried all the related topics on Stack Overflow I could find relating to this problem.
So I hope there is someone clever that can assist.
This is the layout of my report:
Now as you can see Group Header and Details a & b contain Subreports. Details B however is suppressed and hide blank sections.
Now Group Header #1 is in the section ticked as Suppress Blank and Keep Together. I also went to each individual Sub report and set the details sections to Suppress Blank and also went from the main report right clicking on each subreport and set in the uncommon tab unticked the keep objects together as well under the subreport tab I checked the option to suppress blank sub report.
But as you can see there is still blanks printing as this is the info which is suppressed for a condition I have set....
Anybody have any ideas?
I am trying to suppress the text value in crystal by right clicking on the text object, selecting suppress and hitting the x2 button and adding the formula
isnull(field)
When I look at the print preview the text is still there when the field value is null.
In the formula section, I changed the code from
isnull(field)
to
if {field} = "" then
true;
In Crystal Reports a placeholder will still be on-screen when you hover over a suppressed field. Since the field is NULL there really won't be a visual difference between NULL and suppressed fields.
~ Nathan
I can put my field in a section, right-click on the section (left margin of the editor) and select Section Expert... In the Section Expert, I ensure the correct section is selected, then I can check the box for "Suppress Blank Section".
Really all you needed was a pair of {} inside ()
Correct line of code to suppress anything in report if it's null is:
isnull({your_report_name.database_field_name})
Using Crystal Report 8.5
How to skip blank pages?
I want to skip blank pages or blank field?
Need Formula Help.
You can check the check box in the Section Expert that says "Suppress Blank Section" to suppress the entire section
To suppress a field you can right click on the field and click Format Field and press the formula button (x+2) next to the suppress check box on the common tab and then enter your formula to use as the suppression logic. To this simply put in a function that would return a boolean value where a returned value of true would suppress the field and false would show the field. Remember that you don't need to check the suppress check box if you have a formula entered. Hope this helps.