Training Partner Graphic Report–Conditional Field

A common requirement in a report is to have a conditional field. What is a conditional field? Display one value if a condition is true, else display another.

An example would be Payment Method in an invoice. If the Payment Method is a credit card, then display the credit card type, otherwise display the payment method such as Cash or Check. This will be the example used below.

  1. Open the Graphic Report you wish to edit.


  2. Click on the Report Designer icon ReportDesignerIcon
  3. This opens the Editing Report window


  4. To have a conditional field on the report, we must use a variable. Click the Variable icon variableicon
  5. Click on the report where you would like the variable field to appear.


  6. You can choose what type of date (data type) the variable will display by using the String dropdown.


    Note that String is the most common data type. We will be using String in our example.

  7. Right click the variable field and select Calculations…


  8. The Calculations dialog will appear.


    You enter your calculation above. The information on the right-hand side are the fields you selected in the report. They can be dragged and dropped to the left-hand side to create your calculation .

  9. Below is a sample calculation from our example. 


    Notice the semi-colon at the end.

  10. You must compile your formula to ensure it is correct by right clicking in the calculation and selecting Compile.


  11. Click OK on the Calculations dialog to save your change.
  12. Click the Preview tab to verify the calculation works.


Clearly, there is a lot of functionality and complexity that comes with calculations.

You can check out the System Administrator’s Guide under Graphical Reports. Specifically, look in the Code Environment section.

OSG Consulting Inc. is available for report customization.

Contact us at

This entry was posted in Training Partner and tagged . Bookmark the permalink. Post a comment or leave a trackback: Trackback URL.

Post a Comment

Your email is never published nor shared. Required fields are marked *

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <s> <strike> <strong>