Feature Upgrade: Starting with CSPro 7.7, the version of Templated Reports that uses report has been superseded by a new version, Templated Reports. This version will be removed in a future version of CSPro.
b = report(template_file_nameʃ,output_file_nameʅ);
The
report function generates a
templated report. The function reads the template specified in the string expression
template_file_name and analyzes the template for any
queries that need to be executed. After running the queries, and passing to the template any data created using the
setreportdata function, a report is created based off the template.
The optional string expression output_file_name specifies the name for the created report. If this argument is not specified, the report will be saved to a temporary file and it will be displayed in a web browser. These temporary reports are deleted when the application closes.
The function returns a logical value of 1 (true) if the report was generated correctly, and 0 (false) otherwise. Any errors encountered when creating the report are displayed, which will help you diagnose any problems with the template.
// create and view the report
report("interviewer_report_template.html");
// alternatively, save the report
report("interviewer_report_template.html","interviewer_report." + getoperatorid() + ".html");