• <GetStart>
  • CSPro User's Guide
    • The CSPro System
    • Data Dictionary Module
    • The CSPro Language
    • Data Entry Module
    • Batch Editing Applications
    • Tabulation Applications
    • Data Sources
    • CSPro Statements and Functions
    • Text Templates
    • Templated Reporting System
      • Templated Reports
      • Report.save Function
      • Report.view Function
      • JSON Representation
    • HTML, Markdown, and JavaScript Integration
    • Action Invoker
    • Appendix
  • <CSEntry>
  • <CSBatch>
  • <CSTab>
  • <DataManager>
  • <TextView>
  • <TblView>
  • <CSFreq>
  • <CSDeploy>
  • <CSPack>
  • <CSDiff>
  • <CSConcat>
  • <Excel2CSPro>
  • <CSExport>
  • <CSIndex>
  • <CSReFmt>
  • <CSSort>
  • <ParadataConcat>
  • <ParadataViewer>
  • <CSCode>
  • <CSDocument>
  • <CSView>
  • <CSWeb>

Report.save Function

Format
b = report_name.save(report_filename);
Description
The Report.save function runs the text template logic in the templated report and saves the output as a file specified by the string expression report_filename. The function is meant to be called from outside the templated report's logic.
If the templated report's format is Markdown, the report will automatically be converted to HTML before saving if the extension of report_filename is HTML-related (.html, .htm, or .cshtml). Otherwise, the output is saved as Markdown.
Return Value
The function returns a logical value of 1 (true) if successful and 0 (false) otherwise.
Example
HOUSEHOLD_REPORT.save(maketext("household_report_%d.html", timestamp()));
See also: Templated Reports, Report.view Function