• <GetStart>
  • CSPro User's Guide
    • The CSPro System
    • Data Dictionary Module
    • The CSPro Language
    • Data Entry Module
    • Batch Editing Applications
      • Introduction to Batch Editing
      • Create a Batch Edit Application
      • Order of Editing
      • Correcting Errors
      • How to ...
        • Manipulate Automatic Reports
        • Create a Specialized Report
        • Use Hot Decks
        • Initialize Hot Decks in Program Logic
        • Initialize Hot Decks Using Saved Arrays
        • Interpret Reports
        • Run Production Batch Edits
      • Steps in Developing a Batch Editing Program
    • Tabulation Applications
    • Data Sources
    • CSPro Statements and 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>

Create a Specialized Report

Manipulate Automatic Reports showed how to add messages to the default report which is automatically generated after a run. This type of report may be useful for debugging, but in general, the subject-matter staff responsible for edit review will usually prefer a more "user-friendly" report - that is, one that presents the information in a format dictated by the users.
Such a "custom" report can be generated by using the write function. This command will put the information you want where you want it in your report. For example, for each questionnaire, you'll want to know the identifying ID values. If this were a population census, the case ID would likely be composed of levels of geography [Province, District, Village, EA, etc.] attached to a household identification. The errmsg command could display the IDs as follows:
Case [010117100110870031] has 12 messages (0 E / 0 W / 12U)
As you can see, this may be difficult for the non-programmer to decipher. But by using the write command, you can more clearly display this. One way would be to put the following write statements in the preproc of the first level (in this way it would only get written out once per questionnaire):
PROC QUEST

preproc

   
write ("***************");
   
write ("Province: %3d", PROVINCE);
   
write ("District: %3d", DISTRICT);
   
write ("Village : %3d", VILLAGE);
   
write (" EA : %3d", EA);
   
write ("***************");
   
write (" "); // blank line
After the execution of the program, the .wrt [report] file would show the following (of course, actual values will vary depending on the questionnaire IDs):
***************
Province: 1
District: 7
Village : 30
EA : 4
***************
Additional write statements can be included in the batch edit program to generate a customized report.