(Prior to CSPro 7.7, a different version of templated reports existed. That version can no longer be used as it was removed in CSPro 8.0.)
CSPro can create HTML
reports using case data as well as results from queries into paradata
and other data sets. By specifying tags in the templated reports, CSPro logic can be run and CSPro dictionary variables can be accessed to render a dynamic report.
Each templated report is a CSPro logic object and the following functions can be called via dot notation
|save||Saves the report to a file.|
|view||Displays the report in an embedded web browser.|
|write||Writes text to the report.|
In addition to these object functions, templated reports can be used as arguments to the filename
Frequency tables can be written directly to a report using the Freq.save
A templated report can be added to the project by selecting Add Files
under the Files
under the Files
The name of the report will be automatically created based on the filename, but can be modified using the Report Properties
CSPro logic can be embedded in the templated report by starting the logic with <? and ending the logic with ?>. The tag can be used to embed inline logic or multiple lines of logic.
There are three ways of writing numeric and string expressions to templated reports:
- ~~...~~ writes the results of the numeric or string expression specified between the tildes.
- ~~~...~~~ is similar to the above version except that the text will not be automatically escaped for HTML.
- $.write writes directly to the report.
A templated report can be previewed in both data entry and batch by pressing Ctrl + F5. This will not run the CSPro logic, so the preview will not necessarily look complete. Use it to preview the HTML and CSS.