Conditional expression examples

You can customize any of the standard reports in Accounting CS or create your own reports from scratch using the Report Designer. Adding conditional expressions to a report lets you include or exclude specific data based on certain criteria. The following accounting report examples include commonly used conditional expressions.

Example 1: Exclude zero-balance accounts (all or no activity)

Account Groupings report
To exclude all zero-balance accounts, clear the
Print zeros
checkbox in the Row Properties for the account detail row.
Use the following steps to exclude only zero-balance accounts without activity.
  1. Select row 8 in the Account Groupings report and create the following expression shown in the following example.Screenshot example
  2. Select row 6 in the Account Groupings report and insert the following conditional expression to exclude the account group heading when there's no activity.Screenshot example
  3. Repeat step 2 and select the following rows in the Account Groupings report to prevent the remaining headers, footers, and blank rows from printing when there's no activity in the account detail row.
    Row number
    Condition to test
    Action
    7
    RowCount(8) > 0
    If true, print: 7 through 7
    18
    RowCount(8) > 0
    If true, print: 18 through 19
    19
    RowCount(8) > 0
    If true, print: 18 through 19
    20
    RowCount(18) > 0
    If true, print: 20 through 21
    21
    RowCount(18) > 0
    If true, print: 20 through 21

Example 2: Exclude account detail and display balances in subcode row

Account Groupings report
To exclude account detail and show balances in the subcode row instead of with each account, use the Report Designer to change the report as follows.
  1. Mark the
    Optional section
    checkbox and enter a
    Section name
    in the Row Properties for each row in the repeating group for accounts.
  2. Add new rows under the existing account details that are set up to be alternate subcode rows. These rows should include the balance subtotals.
  3. Create conditional expressions for the alternate subcode rows to print only if the optional account detail row has a
    RowCount < 1
    .

Example 3: Separate debit and credit columns (using total balance)

Trial Balance (Condensed, Detailed, and Segmented) reports or Trial Balance Worksheet report
Use the following procedure to separate debit/credit columns using a conditional expression.
  1. Copy and paste an existing balance column to add other balance columns.
  2. Create conditional expressions for the amount cells to print only if the amount variable is >= 0 (for the debit amount cell) and to print only if the amount variable is < 0 (for the credit amount cell).
    note
    To display the credit amounts as positive values, place the mouse pointer in the credit amount cell and select
    Format
    then
    Cells
    , select the
    Format
    tab (Amount category), then mark the
    Multiply by -1
    checkbox.
  3. Update *OUT OF BALANCE* conditional expression to print when a variance exists between debit and credit column totals.
  4. Update the column heading text, as needed.

Example 4: Separate the P&L and B/S columns

Trial Balance Worksheet report
Use the following procedure to separate the P&L and B/S columns using conditional expressions.
  1. Copy and paste an existing balance column to add more balance columns in the Trial Balance Worksheet report.
  2. Create a conditional expression in the report that prints the amount variable in the P&L column only if
    ChartofAccounts.Accounts.TypeCode = "R" Or ChartofAccounts.Accounts.TypeCode = "E"
    .
  3. Create a conditional expression in the report that prints the amount variable in the B/S column only if
    ChartofAccounts.Accounts.TypeCode = "A" Or ChartofAccounts.Accounts.TypeCode = "L" Or ChartofAccounts.Accounts.TypeCode = "Q"
    .
  4. Update the *OUT OF BALANCE* conditional expression to print when a variance exists between debit and credit column totals.
  5. Update the column heading text as needed.

Example 5: Include items that meet a specific threshold

Trial Balance Variance - 2 Year or 5 Year Comparison reports
To include items that meet a specific threshold, use the Report Designer to change the report and set up conditional expressions to print only the rows based on a specific change in dollar amount and/or percentage.
For example, for a $500 threshold in the
By Account Number
region, create a conditional expression in the report that prints the account detail row (row 4) only if
I4 <= -500 Or I4 >= 500
.

error-icon

Triva isn't available right now.

Check out the support page for our phone number and hours

error-close