This section will show the user the steps to rendering all the reports in a specified folder into the desired output format. PDF will be the chosen output format in this case.
Add and
Job. Enter a unique name for the job. For instance,
RenderAllReport, then click Finish.
The job will be created successfully.
Design tab, right-click on the job, select
Add, then FileLoop.
FileLoop and select Script.
Then, add RenderReport. The structure will be similar to
Figure 5.1, “FileLoop Tree”.
FileLoop panel,
enter the folder directory in the Folder: field. User can
also click on ... to select the folder. Check
Recursive if the files are contained within the folders
of folders.
File Criteria panel, add a new criteria. In
Test, choose Extension in the dropdown list.
For When condition, select Equals. As for
Value, enter rml like in
Figure 5.2, “File Criteria”.
Script, enter the following. This is to retain the directory
structure:
newFileName = FileName.replace(/.rml/g,".pdf");
Render Report job, enter ${FileName}
for the Name: field in the Report panel.
This is so that the name of the PDF generated will take on the name of the
rml file.
Target panel, select userhome
and PDF for the output target name and
output mime-type from the dropdown list respectively.
For the Filename: field, enter ${=newFileName}.
For the Folder: field, enter the desired folder name, for example output1,
as seen in
Figure 5.3, “Target Parameter”.
Log tab to view the log.