crystal-reportssuppresscrystal-reports-2016

Suppress a text object if embedded summary field has a certain value in Crystal Reports


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


Solution

  • 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.