3 Replies Latest reply: May 15, 2014 9:57 AM by Grant Perkins RSS

    Multi-line trap over headers/footers

    CzIII _

      I've tried everyting that I can think of, and searched here for an answer.  Please help.

       

      I have a 2 line trap that works fine except for when lines 1 and 2 are split over the footer then header.  There is a blank line directly above the footer that Monarch picks as the second line of the trap. I'll try to represent it here:

       

      Trap Info             Line One Data

       

      Footer

      Header

                            Line Two Data

       

      Works for all other lines.  I tried to define the headers and footers, but the blank lines keep throwing me off.  I realize that this is probably a newbie question, but I can't get my brain wrapped around it.  Thanks in advance for any help.

        • Multi-line trap over headers/footers
          Grant Perkins

          Nope, not a newbie question as far as I can see more of a 'who programmed this report?' question!

           

          If you were able to define the entire section between the 2 record lines as a Page header you would be OK - the header lines would be skipped.

           

          The footer throws it.

           

          Do you need anything extracted from the footer or could you just discard it and the blank line above it?

           

          What I am thinking is that you may firstly want to manipulate the report to eliminate the problem lines (the blank line and the footer lines) and then work with the revised report.

           

          However, if you were to reformat the report and remove all blank lines would that give you some problems elsewhere? If it would then the idea of re-formatting suddenly gets a little more complex!

           

          In essence the approach would be to generate a first phase to the process that would select the full length of every line in the report. The filter out the blank lines and any lines that relate to footer areas. Export the single column table that results to a new fixed text file or print it to a file. Be sure to use a suitable font to retain the format. fixedsys probably good.

           

          Read the newly output file as a new report, template the header lines and the lines either side should work as a 2 row detail template.

           

          Simple as that!     

           

          If you need something out of the footer sections things could get a little more complicated again.

           

          Late's see where the suggestion above takes you before we head off in any other direction.

           

          Hope this helps as a start.

           

          Grant

          • Multi-line trap over headers/footers
            CzIII _

            Thanks very much for the reply.  I was really hoping to not have to massage the report before I could extract the data.  I think that I may have gotten things to work by using a detail template and then an append, but I'm not completely sure.

             

            Thanks again!

            • Multi-line trap over headers/footers
              Grant Perkins

              Originally posted by CzIII:

              Thanks very much for the reply.  I was really hoping to not have to massage the report before I could extract the data.  I think that I may have gotten things to work by using a detail template and then an append, but I'm not completely sure.

               

              Thanks again! [/b][/quote]Sound interesting!

               

              If you always have a second line and can always trap it then you may well get away with making the first line an append.

               

              Not the other way around though I would think and if line 2 is not always there it would be 'interesting'!

               

              Grant