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

    Multiple line Traps

    Alan J

      I am currently using V6 and having problems trapping data that is not always on the same line.

      The data is sometimes on the 3rd line, 4th line or 5th line. Does anyone know how I could resolve this issue? Due to confidentiality I am not able to paste the raw data from the report, but hopefully from the X's and 0's it would help. The *'s represents the data that I need to include with the x's and 0's. Also, not every loan has the *'s.

       

      000000  XXXXX  00000  000 00000 0 00000 000

       

                       

       

        • Multiple line Traps
          Grant Perkins

          Alan,

           

          Hmm.

           

          From what you write the asterisk field always exists but can appear in lines 3, 4 or 5 of a record 'block'.

           

          Is there potential for other data in row 2 (and 3 and 4) or are the rows always blank?

           

          Do you have any  unique 'Tags (field titles)' in the report on the line before the field you require? If yes then it may be possible to define a field based on a preceding string.

           

          Other than that I would be tempted to consider the asterisk field data as a multi-row field starting at row 3 and ending at the next template.

           

          That way the field would pick up the data in any row.

           

          LTRIM can be used to get rid of leading spaces from the field selected.

           

          Even if the idea sometimes collects rubbish in the fields it should be possible to clean up the resulting data.

           

          I hope this helps a little.

           

          If not could you post and extended sample of how a few records might look in a sequence

           

           

          Grant

           

           

          Originally posted by Alan J:

          I am currently using V6 and having problems trapping data that is not always on the same line.

          The data is sometimes on the 3rd line, 4th line or 5th line. Does anyone know how I could resolve this issue? Due to confidentiality I am not able to paste the raw data from the report, but hopefully from the X's and 0's it would help. The *'s represents the data that I need to include with the x's and 0's. Also, not every loan has the *'s.

           

          000000  XXXXX  00000  000 00000 0 00000 000

           

                           

                    • /b[/quote]

           

          • Multiple line Traps
            Alan J

            Grant,

             

            The 2nd row always has data, but the data is not something I want to capture. If the *** is on the 4th line then the 3rd line would be blank. If the *** is on the 5th line, then the 3rd and 4th line would be blank. Below is what it would look like. I hope this helps.                               

            loan # Name policy # type agent code premium

            15000  Alan  1233516 351 12345       1245.00

                 

                          

                • Error Reason

            12345 Alan  123456   352 12345       895.00

             

             

                          

                • Error Reason

             

            • Multiple line Traps
              Grant Perkins

              Hi Alan,

               

              2 answers for you.

               

              If the line with the message actually shows the *** before the message life should be easy.

               

              Simply set up a detail template of 3 lines starting with your primary detail line (line 1).

               

              Map your fields for the first line. On the second or third line paint a field in the HORIZONTAL position where the error text appears. Either line should be OK since we are gooing to 'float' the field vertically.

               

              In the field properties select the ADVANCED tab. Set 'Start field on' to the value *** in the Preceding String field.

               

              Set 'End field on' to a suitable value. In this case Line Count 1 should do it.

               

              That should be it.

               

              BUT

               

              If the asterisks are not available to be used as the preceding string ...

               

              Do the same thing but paint the field on the third line and in the advance tab for the floating field leave the 'Start Field On' as 'Line 3' and set the 'End field on' to either 'Non blank preceding string' or 'Minimum action Only'. That will create a multi line field starting with row 3 and ending when it reaches the next occurrence of the template. This means it will pick up line 3 (and 4 and 5 if they exist).

               

              The only downside to this may be that, if you are running V6.01, the data read for lines 4 or 5 will appear slightly indented. Normally this is due to the extra space added to multirow fields to separate the data on each new line. The spaces can be removed with a LSPIT based calculated field. However 6.01 inserts a <CRLF> for each line and requires a little more attention of you need to fully left justify the text.

               

              If you need to use the second method AND you want to left justify the text and you are not sure how to do that just let me know and I will provide the help you may find useful.

               

              All the best,

               

              Grant

               

              Originally posted by Alan J:

              Grant,

               

              The 2nd row always has data, but the data is not something I want to capture. If the *** is on the 4th line then the 3rd line would be blank. If the *** is on the 5th line, then the 3rd and 4th line would be blank. Below is what it would look like. I hope this helps.                               

              loan # Name policy # type agent code premium

              15000  Alan  1233516 351 12345       1245.00

                   

                            

                  • Error Reason

              12345 Alan  123456   352 12345       895.00

               

               

                            

                  • Error Reason /b[/quote]