2 Replies Latest reply: May 15, 2014 9:57 AM by Dr. Siewert RSS

    Multi Line Trap - Data mismatch

      The report is a Payroll Register Report, it may have up to seven lines, depending on employee contributions etc.  The challange is to capture the detail line and the variable number of appended lines.  The problem is that the employee data "set" does not conform to x amount of employee data per page.  I might have 4 or 5 sets, then at the beginning of a page the last of the previous set, or the beginning of a new set at the bottem of a page.

       

      For example a "set" may look like this:

      EMP NAME          DEPT

      John Doe          8855

      SSN

      999-99-9999

      Voluntary contribution:

      AFLAC:  129.99

      Total Taxes  $ 129.00

       

      Easy enough to trap.  And it seems to get the majority of data except....

      Page breaks may and do interrupt a set.  The breakup is not consistant, it could occur anywhere depending how many lines fit on a page.

      So far I've set a detail line trap the employee name and appended for the the rest (up to 7 total lines)

      The problem is that the append data does not match up with the detail.  For example Joes SSN may end up on Susans data.  I've tried floating traps as well to no avail.

        • Multi Line Trap - Data mismatch
          Grant Perkins

          Hi HGS,

          [font="courier"]EMP NAME          DEPT

          John Doe          8855

          SSN

          999-99-9999

          Voluntary contribution:

          AFLAC:  129.99

          Total Taxes  $ 129.00 /font[/quote]For the page header break problem you need to work out which lines must be included in a Page Header Template to make them 'invisible' to Monarch when it is parsing the body of the report for Detail templates.

           

          I assume you camn pick at the very least the Names and SSN from your detail template? Any lines that always appear in the detail should be included. Does that mean you can work with a 3 line detail template?

           

          Is there always at least one line of additional deductions? (Or nothing but a blank line before the next detail? (Normally))

           

          Assuming at least 4 lines are available - use more of they are possible - create an append template using the same trap as the detail. Use a 4 line (or more) data sample. The number of lines must not exceed the smallest possible detail plus deductions line you can ever find in a version of the report.

           

          For each possible deduction field (Assuming thery are always identified by a preceding description of what they are - "AFLAC:" for example - paint the field where it appears across a line. RIght click the field just painted and in the Adfvanced Properties tab that appears set the "Start Field On" value to "Preceding string" on the same line of e.g.   aflac:  .

           

          Note that fields must not overlap. However you can put more than one field in a line if the report layout makes that possible.

           

          Add fields for the other possible variable entires as well.

           

          If you have too many fields and too few lines simply add another append template for the extra definitions. (From what you have said in the subject post I think a 3 line detail and 4 line append seems to be enough for you anyway.)

           

          The Append template will now be reset whenever the detail template is reset and the field in the append will only appear (despite being below the detail data fields) when the preceding string exists in that record. They will otherwise be blank fields in the table.

           

          Does this help? Have I missed something in your description?

           

          Grant

          • Multi Line Trap - Data mismatch

            That seemed to work, thanks.