This recipe demonstrates the usage of script in the Render If tab of the Section Wizard in the report template.
Steps taken:
- Create a report tempalte (renderIfScriptRpt.rml) using the composite datasource (renderIfScriptRpt.ds).
- Define the following parameter in the Report > Parameters page:Name=COLA, Value=${COLA##A}
- Enter the following script into the Render If tab of Section 1:var ds = DataCacheManager.getCache(“DS1”);
if(ds.getRecordCount() > 0)
true;
else
false;
Screenshot when COLA=A is entered:
To download the necessary files for this recipe, refer to the attached ZIP package.
RenderIf.zip (3.9 KB)