Use parameterized restrictions
Use parameterized restrictions
The following example view uses a parameter in the data source restriction:
<parameter name="clientRestriction" dataType="verbatim" value=""/>
<restriction type="sql" sql="1=1 ${parameters['clientRestriction']}"/>
In the JavaScript, the value of the parameter may be modified using
addParameter()
:
report.addParameter('clientRestriction', 'AND wr.date_requested = ${sql.currentDate}');
report.refresh();
Restrict grouped data by date criteria
Group one datasource by another datasource