1

How do you suppress a text object in Crystal if a summarize field inside the text object is equal to 0?

Example of text object content:

Example of summarize field in text object

I want the text object to only display when {Sum of RETOUR_INVOICE_LINE.AMOUNT_EUR} is zero. It seems I can't select a summary field in the suppress formula editor.

enter image description here

svdotbe
  • 168
  • 1
  • 3
  • 16

1 Answers1

1

Create a bool formula to be true or false using an if statement in the formula, then you can drop the new formula into the suppression for the field in question.

So a formula similar to this, lets call it fBool_IsZero

if  {Sum of RETOUR_INVOICE_LINE.AMOUNT_EUR} = 0 then True else False

Then use fBool_IsZero in the suppression shown in your question.

Josh
  • 26
  • 4
  • hi, thanks for your answer, but I get an error when trying to use {Sum of RETOUR_INVOICE_LINE.AMOUNT_EUR} in a formula, it says "This field name is not known". – svdotbe Mar 12 '20 at 08:16
  • Is the SUM a field in use on the report? If not, you'll need to create this and suppress it somewhere, then you should be able to select the Sum field when expanding the '+ Report Fields' when creating the formula – Josh Mar 12 '20 at 08:19
  • 1
    I got it working now, added the SUM field a second time in the report, this time outside the textbox, and suppressed it like you suggested. Then I was finally able to select that field in the suppress formula of the textbox, by expanding the '+ Report fields' like you suggested. The resulting suppress formula looks like this: Sum({RETOUR_INVOICE_LINE.AMOUNT_EUR}, {INCOMING_INVOICE.INCOMING_INVOICE_SEQ}) = 0. Didn't need boolean formula eventually but you put me in the right direction, I'll accept your answer, thanks! – svdotbe Mar 12 '20 at 08:51