1 Reply Latest reply: May 15, 2014 9:54 AM by Grant Perkins RSS

    Headers and Footers

    Lori@UPenn _

      1. How would I keep the header (on the 1st page only) which is generated with the original report. See below the line that starts with DATE 02/09/06.

      2. How would I count the number of records - could I somehow use the RECNO function ?  See below "Grand Totals CNT: 4"

      3. How could I keep the footer (on the last page only) which is generated with the original report. Currently it looks like:

      END OF REPORT

      DATE 02/17/06 TIME 09:58 A.M. PAGE 5 REPORT *$A2LBAX U OF P HEALTH SYSTEM N0FH

      but I could live with just the words "End of Report".

       

       

      Current report:

       

      DATE 02/09/06 TIME 10:33 A.M. PAGE 1 REPORT *$A2LBAX U OF P HEALTH SYSTEM N0FH

       

      LAST NAME|FIRST NAME|MREC#|PATNO|ADMIT DATE|DISCHARGE DT|SERVICE|PRECERT

       

       

      LAST1 ,ROSEANNE |016817553 |31220932 |02/01/2006|02/08/2006|NEW|#NONE

      LAST2 ,PHYLLIS |003900131 |31177173 |01/22/2006|02/08/2006|TRP|2271160

      LAST3, STAN |043387323 |31252430 |02/06/2006|02/08/2006|CVM|2322454

      LAST4 ,RHOBERTHIA |052475050 |31259351 |2/07/2006|02/08/2006|EMM|106020801252

       

       

      END OF REPORTDATE 02/09/06 TIME 10:33 A.M. PAGE    4 REPORT *$A2LBAX     U OF P HEALTH SYSTEM             N0FH

       

      LAST NAME|FIRST NAME|MREC#|PATNO|ADMIT DATE|DISCHARGE DT|SERVICE|PRECERT

       

      GRAND TOTALS

      CNT:4

       

      -


       

      FORMAT DESIRED:

       

      DATE 02/09/06 TIME 10:33 A.M. PAGE 1 REPORT *$A2LBAX U OF P HEALTH SYSTEM N0FH

       

      LAST NAME|FIRST NAME|MREC#|PATNO|ADMIT DATE|DISCHARGE DT|SERVICE|PRECERT

       

       

      LAST1|ROSEANNE|16817553|31220932|02/01/2006|02/08/2006|NEW|#NONE

      LAST2|PHYLLIS|003900131|31177173|01/22/2006|02/08/2006|TRP|2271160

      LAST3|STAN|043387323|31252430|02/06/2006|02/08/2006|CVM|2322454

      LAST4|RHOBERTHIA|052475050|31259351|2/07/2006|02/08/2006|EMM|106020801252

       

      4 RECORDS

       

      END OF REPORT

        • Headers and Footers
          Grant Perkins

          Hi Lori,

           

          If this relates to the same analysis requirement as you last post then opening the file as a database for the detail records will effectively require that the header and footer in fo is discarded.

           

          Plan B would be to extract the header and footer in a separate process (or two) and save them as files. Then concatentate them again once the amended detail data has been created (Header FileDetail OutputFooter file)

           

          Alternatively forget about the database route previously suggested, grab every line from the report as it is by painting a songle field on a single line for the entire width of the report and grabbing everything.

           

          For those lines which have "|" characters, slice and dice all the datafields out of each line using the techniques previously suggested (may require a couple of additional functions there) and reformat the line pretty much as before. Do not reformat the header and footer lines (ie the header and footer fields.)

           

          Export the revised report lines.

           

          I'm starting to wonder where this report is to be sent when you have finished with it and what it will be used for. Presumably the answers to these questions are fundamental to the structure of the file you are being asked to produce.

           

          I hope this makes sense.

           

          Grant