• <Helps for GetStart>
  • CSPro User's Guide
    • The CSPro System
    • Data Dictionary Module
    • The CSPro Language
    • Data Entry Module
    • Batch Editing Applications
    • Tabulation Applications
    • CSPro Statements and Functions
      • Statement Format Symbols
      • Alphabetical List of Functions and Statements
      • List of Reserved Words
      • Deprecated Features
      • Declaration Statements
      • Array Object
      • Audio Object
      • Barcode and QR Codes
      • Document Object
      • File Object
      • Freq Object
      • Geometry Object
      • HashMap Object
      • Image Object
      • List Object
      • Map Object
      • Path
      • Pff Object
      • SystemApp Object
      • ValueSet Object
      • Program Control Statements
      • Assignment Statements
      • Data Entry Statements and Functions
      • Batch Edit Statements
      • Numeric Functions
      • String Functions
      • Multiple Occurrence Functions
      • General Functions
        • Compress Function
        • Decompress Function
        • Diagnostics Function
        • Encode Function
        • ErrMsg Function
        • ExecSystem Function (Desktop)
        • ExecSystem Function (Mobile)
        • ExecPFF Function
        • GetProperty Function
        • GetLabel Function
        • GetLanguage Function
        • GetSymbol Function
        • GetValueLabel Function
        • Hash Function
        • HtmlDialog Function
        • InValueSet Function
        • Invoke Function
        • IsChecked Function
        • LoadSetting Function
        • LogText Function
        • MaxValue Function
        • MinValue Function
        • Paradata Function
        • PathConcat Function
        • PathName Function
        • Report Function (Deprecated)
        • SaveSetting Function
        • SetLanguage Function
        • SetProperty Function
        • SetReportData Function (Deprecated)
        • SetValueSet Function
        • SetValueSet Function With Arrays
        • SetValueSets Function
        • Special Function
        • SqlQuery Function
        • Stop Function
        • SysParm Function
        • Tr Function
        • Trace Function
        • UUID Function
        • View Function
        • Warning Function
      • Date and Time Functions
      • External File Functions
      • Synchronization Functions
      • Export Attributes
    • Templated Reporting System
    • HTML and JavaScript Integration
    • Appendix
  • <Helps for CSEntry>
  • <Helps for CSBatch>
  • <Helps for CSTab>
  • <Helps for DataViewer>
  • <Helps for TextView>
  • <Helps for TblView>
  • <Helps for TRSWin>
  • <Helps for CSDeploy>
  • <Helps for CSPack>
  • <Helps for CSFreq>
  • <Helps for CSSort>
  • <Helps for CSExport>
  • <Helps for CSReFmt>
  • <Helps for CSDiff>
  • <Helps for CSConcat>
  • <Helps for TRSSetup>
  • <Helps for ParadataViewer>
  • <Helps for ParadataConcat>
  • <Helps for CSIndex>
  • <Helps for Excel2CSPro>
  • <Helps for CSWeb>

Report Function (Deprecated)

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.
Format
b = report(template_file_nameʃ,output_file_nameʅ);
Description
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.
Return Value
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.
Example
// create and view the report
report("interviewer_report_template.html");

// alternatively, save the report
report("interviewer_report_template.html","interviewer_report." + getoperatorid() + ".html");
See also: SetReportData Function (Deprecated), Templated Reports (Deprecated)