• <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.view Function

Format
b = report_name.view(ʃviewer_argumentsʅ);
Description
The Report.view function runs the logic in the templated report and displays the output in an embedded web browser. The function is meant to be called from outside the templated report's logic.
HTML files or web pages are displayed in an embedded window using a Chromium-based web browser (Edge WebView2 on Windows; WebView on Android). In this web view, it is possible to use the Action Invoker to run user-defined functions or to execute other CSPro operations.
Viewer Arguments
Optional named arguments can be used to control how the embedded web browser displays on Windows:
  • title := string expression giving the title of the window.
  • width := numeric expression specifying the width of the window in display units.
  • height := numeric expression specifying the height of the window in display units.
  • showCloseButton := conditional expression that, if false, hides the window's Close button.
If either the height or width is specified, then both values must be provided. Hiding the Close button also removes the margin around the web browser, so the browser will fill the entire embedded window.
Return Value
The function returns a logical value of 1 (true) if successful and 0 (false) otherwise.
Examples
HOUSEHOLD_REPORT.view();

HOUSEHOLD_REPORT.
view(title := "Household Report",
                     
width := 600, height := 400,
                     
showCloseButton := false);
See also: Templated Reports, Report.save Function