Reports - Writing Custom Column Expressions

Examples

Several examples are in the Report Nuggets section of this site, or just search for 'reportsql'.

Table Names

You can use %tableAlias%      to reference the current table. Most of the report code automatically aliases the tables as matter_5      or person_22      depending on how they are added to the report. This alias will allow you to reference the current table the field is created on instead of needing to know the name of the table directly.

%tableAlias%   also makes your expression portable across reports, and sites if you export a report. The matter_5 table on Report Foo could be matter_1 on Report Bar.

Parentheses

We recommend wrapping whatever expression you create in a set of parentheses to make sure it is evaluated on its own.

Filtering

Some Expressions will now allow you to filter on them. Others may allow you to filter on them. If the formula involves any aggregation, you may want to use the Advanced -> Apply after Aggregate option on the filter.

SQL Language

LegalServer uses PostgreSQL 14.

Did this answer your question? Thanks for the feedback There was a problem submitting your feedback. Please try again later.

Still need help? Contact Us Contact Us