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

    Problem with Page Header trap

    Richard Corby

      I am trying to use the Page Header trap to overcome the problem with Page Breaks where I don't want them.  I'm running accross the following situation:

       

      [font="courier"]

       

      2003/12/01 SABC01150   COMPTES PAYABLES                    Q                           26149   ESR 

      2003/09/19   0          80   0        0             0         0              -4327.66    0         

      0                                                                               

      -


      2003/12/01 SABC01150   COMPTES PAYABLES                    Q                           26149   ESR 

      2003/09/19   0          80   0        0             0         0              -8495.29    0         

      0                                                                               

      -


      2003/12/01 SABC01150   COMPTES PAYABLES                    Q                           26149   ESR 

      -


      2003/09/19   0          80   0        0             0         0              -1283756.22 0         

      0                                                                               

      -


      2003/12/01 SABC01150   COMPTES PAYABLES                    Q                           26149   ESR 

      2003/09/19   0          77   0        0             0         0              566492.08   0         

      0                                                                               

      /font[/quote]I cannot figure out why a page break is created incorrectly.  There are 140,000 "sections" like this, and this error happens on approx. 10 lines.  Obviously, trapping is incorrect on these lines.

       

      Any ideas on how to overcome this?

        • Problem with Page Header trap
          Grant Perkins

          Richard,

           

          I am not convinced I understand your problem description so may I paraphrase it?

           

          You have a report with about 140,000 sections each with 3 lines of information. Sometimes these span page breaks set by the 'print' program (i.e. each printed page would have a fixed number of lines). To overcome this problem you have set up each section with a page header giving, in effect, 3 line long pages.

           

          However, sometimes (10 times in 140,000 'pages') an extra page break is included after only one line of a section. In effect a single section is broken into 2 incorrect sections.

           

          Is that about it?

           

          You don't say how you are doing the trapping and mapping. My first inclination however is to suggest that it may not be the trapping at fault, although that is obviously the first thing to check. I guess verify might show something up here?

           

          I have come across things like this before and it has been a problem to work out what has happened. From memory the problem usually (not  happened very often though) originated from some format peculiarities on the original report. Blank or partially populated sections for example. This can fool some otherwise perfect template definitions.

           

          Can you check the file for spurious print format characters or maybe an extra blank row or two or something like that at the positions that are causing the problem?

           

          Are the 10 problem sections randomly spaced through the report or do they occur in a regular pattern every X thousand records?

           

          If you alter the size of the report (cut a few records of the top or bottom) does it change the place where the errors occur?

           

          Just some thought to start with. Hopefully someone will have existing knowledge of the complete answer to this.

           

          Unfortunately the last time I saw something along these lines was a while ago and I don't remember precisely what I found in the end or how I worked around it.

           

          The only other thing I can think of is the Input Option to Force Page Breaks after a certain number of lines and whether this could somehow be coming into play. You could try resetting that to a completely different value to see what happens.

           

          Grant

           

          PS  Have you checked the other entries in the forum and FAQ that relate to Page Break or Page Header? They may provide ideas.

           

           

            Originally posted by Richard Corby:

          I am trying to use the Page Header trap to overcome the problem with Page Breaks where I don't want them.  I'm running accross the following situation:

           

          [font="courier"]

           

          2003/12/01 SABC01150   COMPTES PAYABLES                    Q                           26149   ESR 

          2003/09/19   0          80   0        0             0         0              -4327.66    0         

          0                                                                               

          -


          2003/12/01 SABC01150   COMPTES PAYABLES                    Q                           26149   ESR 

          2003/09/19   0          80   0        0             0         0              -8495.29    0         

          0                                                                               

          -


          2003/12/01 SABC01150   COMPTES PAYABLES                    Q                           26149   ESR 

          -


          2003/09/19   0          80   0        0             0         0              -1283756.22 0         

          0                                                                               

          -


          2003/12/01 SABC01150   COMPTES PAYABLES                    Q                           26149   ESR 

          2003/09/19   0          77   0        0             0         0              566492.08   0         

          0                                                                               

          /font[/quote]I cannot figure out why a page break is created incorrectly.  There are 140,000 "sections" like this, and this error happens on approx. 10 lines.  Obviously, trapping is incorrect on these lines.

           

          Any ideas on how to overcome this? /b[/quote]

           

          [size="1"][ December 11, 2003, 05:01 AM: Message edited by: Grant Perkins ][/size]