1 Reply Latest reply: May 15, 2014 10:12 AM by Olly Bond RSS

    another model question

    monarchman7 _

      Again, I can't post the real document so here is this silliness:

       

           dchdcvllcxv zcxcxkljzkmzcx xckkxcm

           cxmxc cxjcxjkxckj cxjcxjj cxjxcj

           xcmcxm cxjcxjjcx cxjcxjjcx

           xcncx cxcxkjlkcx ckkcx xkkck xckcxkk

           200-1124                                             pickup1

           dchdcvllcxv zcxcxkljzkmzcx xckkxcm

           cxmxc cxjcxjkxckj cxjcxjj cxjxcj

           xcmcxm cxjcxjjcx cxjcxjjcx

           dchdcvllcxv zcxcxkljzkmzcx xckkxcm

           cxmxc cxjcxjkxckj cxjcxjj cxjxcj

           xcmcxm cxjcxjjcx cxjcxjjcx

           200-2155                                             pickup2

           dchdcvllcxv zcxcxkljzkmzcx xckkxcm

           cxmxc cxjcxjkxckj cxjcxjj cxjxcj

              200-3176                                             pickup3

              dfsdfsdfsdfs vcjkcvkjcvxkj cvklcxlk

           dchdcvllcxv zcxcxkljzkmzcx xckkxcm

           cxmxc cxjcxjkxckj cxjcxjj cxjxcj

           dchdcvllcxv zcxcxkljzkmzcx xckkxcm

           cxmxc cxjcxjkxckj cxjcxjj cxjxcj

           200-1188                                             pickup4

      /code

       

      This is somewhat similar to my last one, except not really. All the words are paragraphs I need to pick up together of varying lines, except this time there is nothing to the right or to the left which will help me grab it. If I capture the sentences using the detail and use a non-blank somewhere it will obviously reset at line 2, which is not good (any way to stop monarch from doing this?).

       

      Keep in mind that the number at the bottom is an easy footer to make, it doesn't move and the part at the beginning doesn't change, so I can use that both to pick up the "pickup1, pickup2, etc" and to stop the detail.

       

      I actually have come close with this, I surrounded the paragraphs with some blanks and depending on what example I use it almost grabs everything. If I use a 6 line example it grabs most of them correctly, but some are still messed up. Any idea why changing the example changes what monarch does? My attempt at this only used blanks to try to pick up the paragraphs together.

       

      Thanks guys, this forum (Olly in particular) has been extremely helpful.

        • another model question
          Olly Bond

          Hello Monarchman,

           

          (thanks!)

           

          When you've got indistinguishable lines of data, then trapping can't help. But you can use "invisible" data to get a fix, although you're going to need two or three mdoels.

           

          The trick is do use Page() and Line(), and to make the 200-NNNN lines the Page Header template.

           

          With a calculated field called Page defined as Page(), you should have data like:

           

          dchdcvllcxv zcxcxkljzkmzcx xckkxcm ... 1

          cxmxc cxjcxjkxckj cxjcxjj cxjxcj ... 1

           

          In another model, grab just the 200-NNNN lines as the detail and use a field called Record defined as Recno() to get sequential numbering:

           

          200-1124 ... pickup1 ... 1

          200-2155 ... pickup2 ... 2

           

          Now you can join them using an external lookup to glue the pickup lines to the relevant text, and output a summary like:

           

          pickup1

          Data:     dchdcvllcxv zcxcxkljzkmzcx xckkxcm   

                       cxmxc cxjcxjkxckj cxjcxjj cxjxcj     

                       xcmcxm cxjcxjjcx cxjcxjjcx           

                       xcncx cxcxkjlkcx ckkcx xkkck xckcxkk 

           

          pickup2

          Data:     dchdcvllcxv zcxcxkljzkmzcx xckkxcm   

                      cxmxc cxjcxjkxckj cxjcxjj cxjxcj     

                      xcmcxm cxjcxjjcx cxjcxjjcx           

                      dchdcvllcxv zcxcxkljzkmzcx xckkxcm   

                      cxmxc cxjcxjkxckj cxjcxjj cxjxcj     

                      xcmcxm cxjcxjjcx cxjcxjjcx           

           

          etc.

           

          Export that as a fixed width text and you've got an easy model to trap with an Append and a Detail that should behave themselves.

           

          Hope this helps,

           

          Olly