Combining Two Reports into One Printout

This example combines two data files and two page layouts into one printout, also building on Combining Field Processing and an Electronic Overlay.

Figure Input for a New Report Produced from the Combined Data Files shows the new data and a new overlay.

Input for a New Report Produced from the Combined Data Files

Input for a New Report Produced from the Combined Data Files

Here is the command stream needed to generate both pages of the preceding report:

FORMDEF SLSCOM ;
  COPYGROUP SLSRPT ;
    OVERLAY SLSRPT ;
    SUBGROUP OVERLAY SLSRPT ;
  COPYGROUP COMRPT ;
    OVERLAY COMRPT ;
    SUBGROUP OVERLAY COMRPT ;
PAGEDEF SLSCOM ;
  FONT M104 ;
  FONT M105 ;
  PAGEFORMAT SLSRPT ;                    /*SALES REPORT*/
    PRINTLINE  FONT M104
               POSITION 2 IN .5 IN ;
      FIELD START 1 LENGTH 23 ;
    PRINTLINE  POSITION 2 IN .75 IN ;
      FIELD START 1 LENGTH 9 ;           /*DEFAULT FIELD POSITION*/
      FIELD START 10 LENGTH 5
            POSITION 2.3 IN * ;
    PRINTLINE POSITION 1.5 IN 1 IN ;
      FIELD START 1 LENGTH 4 ;
    PRINTLINE  REPEAT 4
               POSITION .3 IN  1.8 IN ;
      FIELD START 1 LENGTH 7 ;           /*DEFAULT FIELD POSITION */
      FIELD START 11 LENGTH 3
            POSITION 1.5 IN * ;
      FIELD START 16 LENGTH 3
            POSITION 3 IN * ;
      FIELD START 21 LENGTH 3
            POSITION 4.3 IN * ;
  PAGEFORMAT  COMRPT ;                   /*COMMISSION REPORT      */
    PRINTLINE  FONT M105                 /*RECORD 8               */
               POSITION 1.3 IN  1.7 IN ;
      FIELD START 1 LENGTH 18 ;
    PRINTLINE POSITION 3.3 IN 2.2 IN ;   /*RECORD 9               */
      FIELD START 1 LENGTH 4 ;           /*DEFAULT FIELD POSITION */
      FIELD START 10 LENGTH 1
            POSITION 1.7 IN * ;
  PRINTLINE POSITION 1.9 IN 2.6 IN ;     /*RECORD 10              */
    FIELD START 1 LENGTH 10 ;
  PRINTLINE POSITION 4.2 IN 2.9 IN ;     /*RECORD 11              */
    FIELD START 1 LENGTH 1 ;
  PRINTLINE POSITION 1 IN 3.7 IN ;       /*RECORD 12              */
    FIELD  START 1 LENGTH 7 ;
  PRINTLINE POSITION 1.7 IN 4.2 IN ;     /*RECORD 13              */
    FIELD START 1 LENGTH  15 ;