What is the Active Reports equivalent of Suppress If Blank option in CR? - activereports

What is the Active Reports equivalent of Suppress If Blank option in CR?
If want to suppress a textbox in ActiveReports if the content is null or empty.

You'll need to write something like the following in the format event of the section containing the control you want to suppress:
this.TextBox1.Visible = (this.TextBox1.Value != null);

Related

Hide label in Crystal Report

I'm building a Crystal Report with Visual Studio 2015.
So I have a section like this:
Now, I can have section without parameter and If I try to start my report I have this situation:
Now I want change my report and if I don't have parameter for this section the Crystal Report not must to show this label "Parametro, Valore, U.m: Valori Riferimento" and line.
How can I do this?
You can create a new formula (e.g. countElement) with the following content:
Count ({table_name.column_name})
You can use this formula to suppress the header / header items. You have to enable the the suppress option on the properties of the header / header items and set the following formula:
{?countElement} < 1
To set the suppress option you have to right click on the item which you want to suppress (with condition) and choose Format Object. There you choose the Common tab and enable the option Suppress. On the right side you can open the Formula Workshop of the Suppress option. There you have to insert the condition ({?countElement} < 1) to hide the item.
Suppress field in Crystal Reports

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

Crystal Reports: Displaying a record if another record is null, and vice versa

I am building a subreport and have two tables from which I am using one field each containing a phone number.
Original Number {TABLE1.ORG}
Temporary Number {TABLE2.TEM}
What I want:
If {TABLE2.TEM} is not null, then hide {TABLE1.ORG}, else show {TABLE1.ORG}
I tried to use the above as a formula but it doesn't work too Since these both fields are from two different tables if place them next to each other (without any formulas or suppression) in the design mode:
{TABLE1.ORG} {TABLE2.TEM}
...I see them on different lines in preview mode:
+971 4 321321321
+971 4 123123123
Maybe because the formula reads records and evaluate from the same line, I guess this is the reason why above is not working correctly.
It's not obvious why the two fields are appearing on different lines in preview mode, but it's unlikely to be because they are from different tables - it's more likely to be because there isn't enough room in the layout for them both to display in one line, and so they are growing to a size that canb be displayed.
To conditionally suppress {TABLE1.ORG} based on whether the other field is not null:
right-click on {TABLE1.ORG} and select Format Field...
in the Common tab within the Format Editor dialog, click on the conditional suppress formula button x-2 and enter the formula not IsNull ({TABLE2.TEM}) in the Format Formula Editor.
click Save and close to exit from the Format Formula Editor, then click OK to exit the Format Editor dialog.
If you now preview the report, you should find that {TABLE1.ORG} is suppressed where {TABLE2.TEM} is not null.
Note that if you make display of both fields conditional on whether the other is null, then both will be suppressed where neither is null.