• <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
      • Statement Format Symbols
      • Alphabetical List of Functions and Statements
      • List of Reserved Words
      • Deprecated Features
      • Declaration Statements
      • Symbol Functions
      • Item Functions
      • Array Object
      • Audio Object
      • Barcode and QR Codes
      • Case Object
      • Document Object
      • File Object
      • Freq Object
        • Freq Statement (Named)
        • Frequency Formatting Options
        • Freq.tally Function
        • Freq.clear Function
        • Freq.save Function
        • Freq.view Function
      • 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
      • Date and Time Functions
      • External File Functions
      • Synchronization Functions
    • Templated Reporting System
    • 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>

Freq.save Function

Format
b = freq_name.save(ʃfrequencies_filename ‖ report_nameʅ) ʃformatting_optionsʅ;
Description
The Freq.save function generates frequencies based on the values in a Freq object and saves the frequency tables to a frequencies file or to a templated report using the following rules:
  • If a string expression frequencies_filename is specified, the frequencies are saved to a file.
  • If the name of a templated report is specified, the frequencies are saved to the report's HTML contents. This version of the function can only be called from the report's logic, or from a user-defined function. The frequency table will only be written to HTML-based reports. For the frequency table to display properties, you must include a link to the stylesheet: "/css/common.css"
  • If no argument is provided, the frequency table will be saved to the file specified by the Freqs PFF attribute. If this PFF attribute is not specified, the frequency table will be saved to the listing file (if possible).
Optional formatting options allow you to control how the frequency tables are generated. The formatting options include the following commands: valueset, distinct, vset, heading, stat, percentiles, nofreq, decimals, sort, nonetpercents, and pagelength.
Return Value
The function returns a logical value of 1 (true) if the frequencies are successfully saved, and 0 (false) otherwise.
Example
Freq hh_status_freq(HH_STATUS);

forcase LISTING_DICT where FIPS = 13 do
    hh_status_freq.
tally();
endfor;

hh_status_freq.
save("Georgia Household Status.tbw")
See also: Freq Object, Freq.view Function, Frequency Formatting Options