Macros
Macros are functions which are applied just before executing a report. They can be used to dynamically vary the SQL which is executed.
For example, the "filterIfNotNull" macro mentioned earlier will look at a filter value and either insert a filter clause if the filter value is present, or insert "1=1" if the filter value is null. This effectively makes a filter optional.
A detailed summary of how macros work and how you can add your own macros is available in the SqlService javadocs.