How to skip blank pages in the report? - crystal-reports

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.

Related

How to show and hide a LineObject by using formula in crystal report?

I'm using a Crystal Report connected with VB.NET 2010, here I using a Line object, which I need to show or hide depending on data field. Where do I need to set the formula?
This project I use is running with SQL 2008 and VB.NET 2010. I've tried some Formula Field for this topic. But the result is not look like that I want to show.
I use the following code on Formula Field:-
IF isNull({PrintParticularList.CUST_INVOICE_No}) or {PrintParticularList.CUST_INVOICE_No}=""
THEN
""
ELSE
"--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------"
I also try this following Code :-
IF isNull({PrintParticularList.SLNO}) or {PrintParticularList.CUST_INVOICE_No}=""
THEN
Line25.Suppress=True
ELSE
Line25.Suppress=False
But here I got error on Line25.
A number, currency amount,boolean, date, time, date-time, or string is
expected here.
In the Report Designer use the Insert Line tool to draw the line where you want it to appear on your report. The right-click the line object and select "Format Line..." to open the Format Editor dialog box. On this window you will find a check box labeled "Suppress" with an X-2 button to the right. Click the X-2 button and this will open a Formula Workshop window where you will enter the formula that determines if this drawing object should be suppressed or not.
I would recommend the following formula based upon your previous attempts at creating one.
IF isNull({PrintParticularList.SLNO}) or {PrintParticularList.CUST_INVOICE_No}="" THEN
True
ELSE
False
-----EDIT-----
Since you don't have the X-2 button I have 2 more ideas.
1.) Take the 1 section you current have and split it into 3 sections. Then you could place all the content above the line in the first section, place the line in the second section, and the content below the line in the third section. They use the formula to suppress the second section when the line is not needed.
2.) Insert a blank text box in place of the line and set either the top or bottom border of the text box to a single line. Then use the suppress formula to determine if the text box should be shown or hidden.

Suppress blank section

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.

Crystal Reports XI, disappearing field with zero balance

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.

suppress text object if field value is null in crystal

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})

In Crystal Reports, how do I Suppress a Text Object if any row contains a certain value

In my report, I want to display a warning text object in the report header if a column value in any row contains a certain value.
"Warning, this report has problems"
How to I construct a suppression formula for the text object to accomplish this?
If there is some other way to hide/display it, that would be fine also.
How to I construct a suppression formula for the text object to accomplish this?
Right click the text object
Go to Common Tab
There is a Suppress checkbox to the right if it there is a button with a x2, click this button
In the formula editor write a formula that returns true if this "certain value" is in the row or false otherwise
Let's assume you are interested in the ocurrence of value "WarningValue" in the column "MyColumn" in the table "Result".
First, create a formula. Let's call it "MyFormula". It should be like this:
if not isnull({Result.MyColumn}) and {Result.MyColumn} = "WarningValue" then 1 else 0
Then put this formula in details session. You can suppress it.
Then click on the report header using the right button. In the context menu, select "insert section below". Put a text box with the message "Warning, this report has problems" inside this new section. Click in this section using the right button and select "section expert" in the context menu. Put the following formula in the "suppress" option:
sum({#MyFormula}) < 1
So if the report count at least 1 occurrence of the "WarningValue", it will not suppress that message.
Nick nailed it, but he left out one step.
Right-click the text object
Select "Format Text...", which opens the "Format Editor" dialog.
In the "Format Editor" dialog, go to Common Tab.
There is a Suppress checkbox. To the right [o]f it, there is a button with a x2. Click this button
In the formula editor, write a formula that returns true if this "certain value" is in the row, or false otherwise