Skip to Content

Crystal Report Suppress functionality

I am trying to add a very simple suppression formula to my Crystal Report (XI) field but it is not working as expected.

I would like a hardcoded text to be visible if certain conditions are met, otherwise suppress. With the suppress box what it the correct formula?

{table1.field1} = "V1" or
{table1.field2} <> "V2" or
PageNumber > 1

Any assistance would be most appreciated.

Add comment
10|10000 characters needed characters exceeded

  • Get RSS Feed

3 Answers

  • Nov 03, 2017 at 11:06 AM

    Using Or and <> is always difficult I would convert to an If then else

    If {table1.field1}="V1" then true

    else if {table1.field2}<>"V2" then true

    else if PageNumber >1 then true

    else false

    Add comment
    10|10000 characters needed characters exceeded

  • avatar image
    Former Member
    Nov 03, 2017 at 07:09 PM

    Hi Trish,

    Please create a formula with if else statement ex.

    A= If {table1.field1}="V1" or {table1.field2}<>"V2" or PageNumber >1 then 1 else 0

    and apply formula on suppress box as A=1

    Thanks,

    Anish

    Add comment
    10|10000 characters needed characters exceeded

  • Nov 03, 2017 at 08:51 PM

    Hi Trish,

    I don't see any issues with the code you posted. It may not be working due to NULLs.

    Open the Conditional Suppression formula and look for a drop-down selection on the top called 'Exceptions for Nulls'.

    Change that to 'Default Values for Nulls'.

    -Abhilash

    Add comment
    10|10000 characters needed characters exceeded