SQL Reporter
Description
The SQL Reporter macro allows for reporting on arbitrary SQL queries within a report.
Parameters
Name | Required | Default Value | Description |
---|---|---|---|
Data Source | Yes | Name of the configured database | |
Injected | false | If set to |
Examples
Any valid SQL for the underlying database can be used in the body.
Simple example:
{report-table}
{sql-reporter:ds=myDB}
select 'Hello World' as col1
{sql-reporter}
{report-column:title=Column Title}{report-info:row:col1}{report-column}
{report-table}
CODE
Injected example:
{report-table}
{sql-reporter:ds=myDB|injected=true}
select username
from user
where group = '%page:title%'
{sql-reporter}
{report-column:title=Username}{report-info:row:username}{report-column}
{report-table}
CODE