7 Replies Latest reply: May 15, 2014 9:56 AM by Grant Perkins RSS

    Impossible Trap Challenge

    Rormeister _

      The main frame report boys have finally stumped me.  Maybe someone in the group has overcome this one.

       

      I need to trap a row which contains strings in which the characters are spaced apart (see the examples).  Problem is the characters don't always line up one above another, so I can't trap for alternating Blank-Trap Non-Blank-Trap.

       

      Because HTML in this window messes with the formatting, please see an example at:

      [url="http://www.blarg.net/rorym/images/MonarchTrap.jpg"]http://www.blarg.net/rorym/images/MonarchTrap.jpg[/url]

       

      Hope somone can help me with this monster.

       

      Thanks,

      Rory

        • Impossible Trap Challenge
          Grant Perkins

          Rory,

           

          Could you trap on the line above (which looks consistent) using a 2 line template sample, select the entire second line with the double spaced characters and then manipulate the text to obtain the parts of the title that you really need?

           

          I'm thinking RSPLIT probably but I do recognise that some other manipulation may be required before that concept would provide results. There may be other ways.

           

          If the line above is not possible there may be other trap options.

           

           

          Grant

          • Impossible Trap Challenge
            Rormeister _

            We're running 6.01 for this model.  We tried the floating trap but ended up capturing thousands of lines of rubbish.

             

            Thanks

            • Impossible Trap Challenge
              Rormeister _

              Hi Grant,

               

              Thanks for the reply.  The multiple line field approach seemed pretty good, but Monarch tends to balk when it hits a space as the first character in the field.  What results is nothing gets selected at all.

               

              Rory

               

              Originally posted by Grant Perkins:

              Rory,

               

              Could you trap on the line above (which looks consistent) using a 2 line template sample, select the entire second line with the double spaced characters and then manipulate the text to obtain the parts of the title that you really need?

               

              I'm thinking RSPLIT probably but I do recognise that some other manipulation may be required before that concept would provide results. There may be other ways.

               

              If the line above is not possible there may be other trap options.

               

               

              Grant /b[/quote]

              • Impossible Trap Challenge
                Grant Perkins

                Rory,

                 

                I'm a little puzzled, it works for me.

                 

                Let's double check this.

                 

                Select the 2 lines of the report/page header as the sample and trapping on line 1 using the report name, company name, "Page" or whatever seems suitable.

                 

                'Paint' a field on the SECOND line to capture the report summary title. Make this field as big or small as will ever be necessary for the largest report name. I donlt think there is a need for a multi line field for this requirement.

                 

                NOTE:

                 

                V6.01 had a nice feature/anomaly, depending upon you point of view and requiirements at the time. Unlike other version before and since it did NOT automatically LTRIM fields and remove leading spaces - so may be worth checking the width of both Template and Display for the field defined.

                 

                You should get the second line in all its glory.

                 

                If you want to slice and dice it there are some possibilities. Getting rid of the double spacing of the characters is also a possibility although that would be much easier, I think, using V7. Possible in V6 but a bit long winded if the text captured can have a highly variable number of characters within a word and words within the field.

                 

                I hope this helps. If you still don't get the same result we will need to look at other options.

                 

                Have fun.

                 

                Grant

                 

                 

                Originally posted by Rormeister:

                Hi Grant,

                 

                Thanks for the reply.  The multiple line field approach seemed pretty good, but Monarch tends to balk when it hits a space as the first character in the field.  What results is nothing gets selected at all.

                 

                Rory

                 

                  /size[quote]quote:[/size]Originally posted by Grant Perkins:

                Rory,

                 

                Could you trap on the line above (which looks consistent) using a 2 line template sample, select the entire second line with the double spaced characters and then manipulate the text to obtain the parts of the title that you really need?

                 

                I'm thinking RSPLIT probably but I do recognise that some other manipulation may be required before that concept would provide results. There may be other ways.

                 

                If the line above is not possible there may be other trap options.

                 

                 

                Grant /b[/quote][/b][/size][/QUOTE]

                • Impossible Trap Challenge
                  Rormeister _

                  Hi Grant,

                   

                  I can definately get the 2 line sample trapping to work, but only IF I am trapping for a 'Detail' data set.  When using this method to trap for an 'Append' element, Monarch ignores my highlighting and does not capture the text on the second line.

                   

                  I think we're close, but there seems to be a problem with the 2 line sample when trying to 'Append'.

                   

                  Thanks again for your time.

                   

                  Rory

                  Originally posted by Grant Perkins:

                  Rory,

                   

                  I'm a little puzzled, it works for me.

                   

                  Let's double check this.

                   

                  Select the 2 lines of the report/page header as the sample and trapping on line 1 using the report name, company name, "Page" or whatever seems suitable.

                   

                  'Paint' a field on the SECOND line to capture the report summary title. Make this field as big or small as will ever be necessary for the largest report name. I donlt think there is a need for a multi line field for this requirement.

                   

                  NOTE:

                   

                  V6.01 had a nice feature/anomaly, depending upon you point of view and requiirements at the time. Unlike other version before and since it did NOT automatically LTRIM fields and remove leading spaces - so may be worth checking the width of both Template and Display for the field defined.

                   

                  You should get the second line in all its glory.

                   

                  If you want to slice and dice it there are some possibilities. Getting rid of the double spacing of the characters is also a possibility although that would be much easier, I think, using V7. Possible in V6 but a bit long winded if the text captured can have a highly variable number of characters within a word and words within the field.

                   

                  I hope this helps. If you still don't get the same result we will need to look at other options.

                   

                  Have fun.

                   

                  Grant

                   

                   

                    /size[quote]quote:[/size]Originally posted by Rormeister:

                  Hi Grant,

                   

                  Thanks for the reply.  The multiple line field approach seemed pretty good, but Monarch tends to balk when it hits a space as the first character in the field.  What results is nothing gets selected at all.

                   

                  Rory

                   

                     /size[quote]quote:[/size]Originally posted by Grant Perkins:

                  Rory,

                   

                  Could you trap on the line above (which looks consistent) using a 2 line template sample, select the entire second line with the double spaced characters and then manipulate the text to obtain the parts of the title that you really need?

                   

                  I'm thinking RSPLIT probably but I do recognise that some other manipulation may be required before that concept would provide results. There may be other ways.

                   

                  If the line above is not possible there may be other trap options.

                   

                   

                  Grant /b[/quote][/b][/size][/QUOTE][/b][/size][/QUOTE]

                  • Impossible Trap Challenge
                    Rormeister _

                    SOLVED

                     

                    After several more attempts at trying to capture the field as an 'Append' element, I gave up and looked at the Header.  Examining the report more closely, determined that the Header actually forced a new page break.  Understanding this I was able to grab my field by using a 2 line sample and adding the field to the header.

                     

                    Alls well.  Thanks for everyone who helped.

                    • Impossible Trap Challenge
                      Grant Perkins

                      Rory,

                       

                      Have you got a Page Header template defined by any chance? That might cause a similar problem since the page header lines become 'invisible'. On the other hand the page header becomes invisible to all template types, not just appends, so it suggests something a little different.

                       

                      I created a very simple notepad text file with a format something like your sample and duplicated it to make 2 'page headers' and that worked fine but there may be some other factors interfering here. I have just double checked and played with the details/appends and it still works fine so there is something less than obvious going on I suspect.

                       

                      Got any odd appends in there that are not selecting any data?

                       

                      Send me a Private Message with your email address nd I will send you my simple sample and the related model so that we can more accurately compare processes.

                       

                      Don't you just love puzzles?

                       

                      Grant

                       

                      Originally posted by Rormeister:

                         When using this method to trap for an 'Append' element, Monarch ignores my highlighting and does not capture the text on the second line.

                       

                      I think we're close, but there seems to be a problem with the 2 line sample when trying to 'Append'.

                       

                      /quote