Reputation: 21
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.
Upvotes: 1
Views: 16854
Reputation: 73
Nick nailed it, but he left out one step.
Upvotes: 0
Reputation: 3188
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.
Upvotes: 0
Reputation: 3337
How to I construct a suppression formula for the text object to accomplish this?
Upvotes: 2