Report Designer: Creating inline conditional expressions for letters

Show expandable text

We moved!

Help articles have been migrated to the new Help and Support. You can find help for your products and accounts, discover FAQs, explore training, and contact us!

You can use inline conditional expressions to customize predefined letters or to create your own letters in the Report Designer. Using inline conditional expressions in letters enables you to include or exclude information as defined by the criteria of the conditional expressions and provides a time-saving advantage by allowing you to apply them globally across multiple clients in the firm.

Inline conditional expressions consist of formulas that contain standard operators (=, <>, <=, <, >, >=) separated by arguments such as & (and), | (or) that are entered directly into a letter within the design grid. Output statements entered after the question mark (?) need to be in parentheses. Plain text variables need to be contained in their own sets of parentheses, joined together by a plus sign (+) between them. Within each set of parentheses, plain text needs to be in quotes, but variables do not.

To open a letter for editing, choose File > Report Designer, click the plus (+) sign next to the Letters folder in the Letters list frame to expand the list, and then double-click a letter to open it in the design grid.

Recommended: Prior to making changes to a report (including letters and financial statements) in the Report Designer, choose File > Save As to save the report with a different name. (To restore a predefined report in which changes have been made, you can choose File > Restore Default.)

Example of an inline conditional expression

Operator Description
Has Data [HasData(Client.DBAName) ? ("DBA Name has data.")]
Has No Data [HasNoData(Client.DBAName) ? ("DBA Name is blank.")]
Contains [Contains(Client.Name,"test") ? ("Client name contains test.")]
Does Not Contain [DoesNotContain(Client.Name,"abc") ? ("Client name doesn't contain abc.")]
Equals ("="), with the or ("|") argument [Client.CustomFields.Checkbox.Value = "Yes" | Client.CustomFields.Text.Value = "Testing" ? ("The checkbox is yes or the text is testing.")]
Equals ("="), with the and ("&") argument [Client.CustomFields.Checkbox.Value = "Yes" & Client.CustomFields.Text.Value = "Testing" ? ("The checkbox is yes and the text is testing.")]
Greater than or equal to (">=") a number and less than ("<") another number [Client.CustomFields.Number.Value >= 1 & Client.CustomFields.Number.Value < 100 ? ("The number is greater than or equal to 1 and less than 100.")]

Examples of commmonly used conditional expressions

Example 1: Changing the salutation in a compilation letter based on the client’s entity type

This inline conditional expression changes the salutation based on the client's entity type. (The default greeting used in the application is To the Board of Directors.)

[Client.EntityType.Entity = "1120S" ? ("To the shareholders")][Client.EntityType.Entity = "1065" ? ("To the partners")][Client.EntityType.Entity = "1120" | Client.EntityType.Entity = "990" | Client.EntityType.Entity = "990PF" ? ("To the board of directors")]

Result

One of the following salutations is displayed in the Compilation Letter.

  • S Corporation (1120S): To the shareholders
  • Partnership (1065): To the partners
  • C Corporation - Non-Profit (990) or Non-Profit private foundation (990PF): To the board of directors

Example 2: Displaying a different value in a compilation letter based on the client's custom field variable

The following inline conditional expression is based on the value of a client custom field variable. (See also: Creating list entries for custom fields.)

  1. Choose Setup > Custom Fields > Clients and add a Type List with Item IDs as shown in the following illustration.

  2. Choose Setup > Client and enter the appropriate data for the custom fields, as shown in the following illustration.

  3. Replace the words balance sheet in the first paragraph of the letter with the following inline conditional expression, adjusting the fonts, as needed.

    [Client.CustomFields.Basis.Value = "US GAAP" ? ("balance sheet")][Client.CustomFields.Basis.Value = "Tax, Cash" | Client.CustomFields.Basis.Value = "Tax, Accrual" ? ("statement of assets, liabilities, and equity—income tax basis")]

     

    Result 1

    The following changes in the paragraph result when the client custom code is US GAAP.

    Result 2

    The following changes in the paragraph result when the client custom codes are Tax, Cash or Tax, Accrual.

Was this article helpful?

Thank you for the feedback!