2 Replies Latest reply: May 15, 2014 10:10 AM by Schorschi _ RSS

    Multiline field ended by "Nonblank preceding string of .." not working as expected

    Schorschi _

      Hi there,

       

      I have a question regarding defining a multi-line field that is supposed to be terminated by the "Nonblank preceding string of.." option in the advanced tab.

       

      I have a report that looks as follows:

       

                 999 XX-XXXXXXXXX-X XXXX XXXXXX XXXXX XXX                    XXX 99 ***?***      9999

                                    XXXXX XXXXXXXX: XXXXXXX XXX: 9999

      -


      DATE: 99/99/9999               XXXXXXXX XXXXXXXXXX XXXXXXXX XXXXXXXXXXX            PAGE:       9

      TIME: 99:99:99                    XXX - XXXXX XXXXXXXXXXXXX XXXXXXXX

                                          XXX XXXXXXXXXX XX: 99/99/9999

       

      XXXXXXXXXXX: 9999  XXXXXX XXXXXXXX XXX

      XXX-XXXXXXX: X     XXXXXXX XXXXXXX

       

            XXXXXXXX XXXX           DESCRIPTION                    X X X X X     XX XXXXXXXXXXX    XXXXXX

                                    MEMO

       

                 999 XX-XXXXXXXXX-X XXXX XXXXXX XXXXX XXX                    XXX 99 ***?***      9999

                                    XXXXX XXXXXXXX: XXXXXXX XXX: 9999

      /CODE

      Shown is the last two-line record of a page, a page break (line of dashes), a page header, some additional headers, column headers and finally the first two-line record of the subsequent page.

      The page break is actually the three characters 0D 0C 0D (ASCII codes in hex). Monarch represents them as a line of dashes.

       

      Anyway, my single-line detail template is on the first line of the two-line record (that can also only be a single line). My trap string (ØØ-) is on the first three characters of the column preceding the Description/Memo column, i.e. non-blank, non-blank, dash.

       

      So far so good. Since my Description/Memo field can either be one or two lines long I have to define a condition on when to end the capture of data.

       

      So, I chose to specify "Nonblank preceding string of 2[/B] characters" as my "End Field On" condition in the advanced tab of the field.

       

      But, when I do so, the highlighted area for that field extends beyond the two lines of the last record on the page, goes into the page header of the next page and up to and including the word "MEMO" in the column header.

       

      I would expect that the DATE string on the first line of my page header would terminate the data capture for the Description/Memo field, since there are clearly more than two characters before my Description/Memo field on that line.

       

      Can someone explain to me why the data capture for the Description/Memo field doesn't stop before the first page header line?

       

      I am using Monarch version 10.5.

       

      Georg

        • Multiline field ended by "Nonblank preceding string of .." not working as expected
          Grant Perkins

          Hi Georg,

           

          The dashes are simply Monarch's marker for a page break and are not part of the report data it is working with.

           

          I think the solution to your problem, consistency of report format Page Headers permitted, is to define a Page Header template which looks likely, based on your sample, to be 9 or 10 lines long (including blanks although maybe not the last blank line of your detail records have blanks between them) starting at the Page Number line.

           

          Page headers become 'invisible' to the general Monarch process which will simply skip over them as if not there, but can be used as data sources in their own right.

           

          Adding a little to that you will find that the End on preceding string is deliberately precise. By which I mean that using a 2 character definition immediately before the field will look for exactly that  - something in the 2 character positions immediately before the field. If you increase the number from 2 to however many characters there are to the left margin you would likely get the result you want - but the Page Header template is a better option anyway. It also allows you to use (try them to see what happens) other 'End on' criteria that are more generic.

           

          HTH.

           

           

          Grant

            • Multiline field ended by "Nonblank preceding string of .." not working as expected
              Schorschi _

              Grant,

               

              Thanks for your reply.

               

              I'm aware of the impact defining a page header template has. In fact, I had been having a working model file for my report in which the definition of a page header took care of (or perhaps masked) the issue I had with the "Nonblank preceding string" option.

               

              I just noticed that the excerpt I posted was not 100% accurate and might have been misleading. (I had taken out some inline blank space in order to avoid unwanted line breaks).

               

              Here is a corrected version of the report excerpt, though chopped off at the end. I also included some line numbers that are not part of the report:

               

                 XXXXXXXXXXX: 9999  XXXXXX XXXXXXXX XXX

                 XXX-XXXXXXX: X     XXXXXXX XXXXXXX

                  

                       XXXXXXXX      XXXXXXXXX XXXX           DESCRIPTION                    X X X X X

                                                              MEMO

                  

                                               XX-XXXXXXXXX-X XXXXXXXX XXX XXXXX XX                   

                                                              XXXXXXXXXXX XXXXX (XXXXXX)

                                            99 XX-99999X999-9 XXXXXX XXXXXXXXX XXXX                   

                                                              XXXXXXXXXXX XXXXX

              -


              1:XXXX: 99/99/9999                              XXXXXXXX XXXXXXXXXX XXXXXXXX XXXXXXXXXXX

              2:XXXX: 99:99:99                                   XXX - XXXXX XXXXXXXXXXXXX XXXXXXXX

              3:                                                   XXX XXXXXXXXXX XX: 99/99/9999

              4:

              5:XXXXXXXXXXX: 9999  XXXXXX XXXXXXXX XXX

              6:XXX-XXXXXXX: X     XXXXX XXXX XXXXXXX

              7:

              8:      XXXXXXXX      XXXXXXXXX XXXX           DESCRIPTION                    X X X X X

              9:                                             MEMO

              10:

              11:                              XX-XXXXXXXXX-X XXXXXXXX XXX XXXXX XX          99,999.99

              12:                                             XXXXXXXXXXX XXXXX (XXXXXX)

              /CODE

               

              So, I could not understand why data from my DESCRIPTION/MEMO field was captured all the way to and including line 10.

               

              I now realize that I misinterpreted the meaning of the "Nonblank preceding string" option.

               

              I read it as:

              "Nonblank preceding string of n characters anywhere[/U] in a subsequent line up to, but not including the first column of this field"

              /LIST

              where, in fact, it means:

              "Nonblank preceding string of n characters in a subsequent line backtracking from, but not including, the first column of this field"

              /LIST

              So, since there is a date ("XXXX: 99/99/9999") that is longer than 2 characters on the first line of every page, I thought that that would act as my terminating string for ending data capture of that field.

               

              However, the 2 characters were referring to the 2 columns immediately preceding the beginning of the field, and not 2 non-blank characters anywhere on the line before the first column of the field.

               

              In order for the option to work as expected I need to count the columns from the last column of the date string to the first column of my field, which happens to be 30 characters.

               

              So, with a value of "30" in the "Nonblank preceding string" option capturing of the field works just as expected. It stops right before the page header.

               

              Georg