• <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
    • Templated Reporting System
      • Templated Reports
      • Report.save Function
      • Report.view Function
      • Report.write Function
    • HTML and JavaScript Integration
    • Action Invoker
    • Appendix
  • <CSEntry>
  • <CSBatch>
  • <CSTab>
  • <DataViewer>
  • <TextView>
  • <TblView>
  • <CSFreq>
  • <CSDeploy>
  • <CSPack>
  • <CSDiff>
  • <CSConcat>
  • <Excel2CSPro>
  • <CSExport>
  • <CSIndex>
  • <CSReFmt>
  • <CSSort>
  • <ParadataConcat>
  • <ParadataViewer>
  • <CSCode>
  • <CSDocument>
  • <CSView>
  • <CSWeb>

Report.write Function

Format 1
b = report_name.write(string_expʃ, argument1, ..., argumentNʅ)
Format 2
b = report_name.write(msg_numʃ, argument1, ..., argumentNʅ)
Description
The Report.write function writes text directly to a templated report. The function is meant to be called from within the templated report's logic.
Each argument is sequentially inserted into the string_exp or msg_num. Arguments can be numeric or string expressions, but the type of the argument must match the type of the receiving field in the message text. See Message Formatting Options for a complete list of formatting options.
Return Value
The function returns a logical value of 1 (true) if successful and 0 (false) otherwise.
Examples
<?
    HOUSEHOLD_REPORT.
write("The report was generated at: ", timestamp());

   
// Alternatively, use $ to refer to HOUSEHOLD_REPORT
    $.write("The report was generated at: ", timestamp());
?>
See also: Templated Reports