Conditional field suppression in Crystal Reports

MN has enacted Safe and Sick pay that must show on an employees paystub.  I have added this field and label to the DD stub but do not want it to print for employees that are not in MN.  The hours are helfd in time off 2. How can I suppress this field from printing on dd stub if the employee is not accruing it (not a MN employee)?

  • 0

    We don't use the payroll module so forgive me using an Invoice form as my example..

    If the field is in its own section, you can:

    1. Right-click the section in the left margin area
    2. Click "Section Expert"
    3. Click the formula button next to Suppress (No Drill-Down)

    If the field is included in a section that contains other information that you do not want suppressed, then:

    1. Right-click the field itself
    2. Click "Format Field"
    3. Go to the "Common" tab
    4. Do not check the "Suppress" box, instead click on the formula edit button to the right of it

    In either method, at the top of the formula editor change the drop-down from "Crystal Syntax" to "Basic Syntax" unless you are familiar with Crystal syntax and are comfortable converting the formula below. My example is in Basic.

    Enter the following formula (again, I am using an invoice form due to not having the payroll module, so you will need to change the field to match whatever it is for you):

    formula = {AR_Customer.State} <> "MN"

    This should take care of hiding this field unless the employee is located in MN.