(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:
Function | Description |
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 and
view functions.
Frequency tables can be written directly to a report using the
Freq.save function.
A templated report can be added to the project by selecting
Add Files under the
Files menu. If creating a new HTML file, an additional dialog will be displayed with template options. The templates have an HTML scaffolding which includes popular CSS and JavaScript libraries. A templated report can be removed from the project by selecting
Drop Files under the
Files menu.
The name of the report will be automatically created based on the filename, but can be modified using the
Report Properties dialog.
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.