Skip to main content

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 true, the body will have any '%prefix:keychain%' values injected with values from the current report item prior to being rendered. 

Examples

Any valid SQL for the underlying database can be used in the body.

Simple example:

CODE
{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}


Injected example:

CODE
{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}

JavaScript errors detected

Please note, these errors can depend on your browser setup.

If this problem persists, please contact our support.