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

    Multi-Line Record Help

    CLK _

      I have a report that has up to three lines of data per record.  The field placement is static on each line, but the line of the record will only appear if there is data available for that particular line.  I'd like to extract the data into a single row that contains any elements that appear. 

       

      RECORD 1: F1 F2 F3 F4 F5 F6 F7

                 F8 F9 F10 F11

                 F12 F13 F14

      RECORD 2: F1 F2 F3 F4 F5 F6 F7

              F8 F9 F10 F11

      RECORD 3: F1 F2 F3 F4 F5 F6 F7

      RECORD 4: F1 F2 F3 F4 F5 F6 F7

              F8 F9 F10 F11

      RECORD 5: F1 F2 F3 F4 F5 F6 F7

              F8 F9 F10 F11

              F12 F13 F14

       

      RESULT:

      RECORD 1: F1 F2 F3 F4 F5 F6 F7 F8 F9 F10 F11 F12 F13 F14

      RECORD 2: F1 F2 F3 F4 F5 F6 F7 F8 F9 F10 F11

      RECORD 3: F1 F2 F3 F4 F5 F6 F7

      RECORD 4: F1 F2 F3 F4 F5 F6 F7 F8 F9 F10 F11

      RECORD 5: F1 F2 F3 F4 F5 F6 F7 F8 F9 F10 F11 F12 F13 F14

        • Multi-Line Record Help
          Grant Perkins

          There may be a couple of ways to approach this depending on whether the fields have unique preceding 'tags' to identify what the data are.

           

          Assuming they do not you need to set up a multi line field using the advance field properties so that you line one field continues for between one and 3 lines until it reaches the start of the next detail record. You may need to to treat the whole line containing the fields F1 to F7 as a single field for this purpose.

           

          You will end up with a single field containing F1 to F14 if they all exist.

           

          If you then need to separate the individual sections into their own fields you would create some calculated fields and use a function such as LSPLIT to extract the sections of text to the fields you require.

           

          If this does not mean much to you we should be able to take you through it in more detail but in that case it would be useful to know which version of Monarch you have access to.

           

          I hope this helps.

           

          Grant

           

           

          Originally posted by CLK:

          I have a report that has up to three lines of data per record.  The field placement is static on each line, but the line of the record will only appear if there is data available for that particular line.  I'd like to extract the data into a single row that contains any elements that appear. 

           

          RECORD 1: F1 F2 F3 F4 F5 F6 F7

                     F8 F9 F10 F11

                     F12 F13 F14

          RECORD 2: F1 F2 F3 F4 F5 F6 F7

                  F8 F9 F10 F11

          RECORD 3: F1 F2 F3 F4 F5 F6 F7

          RECORD 4: F1 F2 F3 F4 F5 F6 F7

                  F8 F9 F10 F11

          RECORD 5: F1 F2 F3 F4 F5 F6 F7

                  F8 F9 F10 F11

                  F12 F13 F14

           

          RESULT:

          RECORD 1: F1 F2 F3 F4 F5 F6 F7 F8 F9 F10 F11 F12 F13 F14

          RECORD 2: F1 F2 F3 F4 F5 F6 F7 F8 F9 F10 F11

          RECORD 3: F1 F2 F3 F4 F5 F6 F7

          RECORD 4: F1 F2 F3 F4 F5 F6 F7 F8 F9 F10 F11

          RECORD 5: F1 F2 F3 F4 F5 F6 F7 F8 F9 F10 F11 F12 F13 F14 /b[/quote]

          • Multi-Line Record Help
            CLK _

            I tried your suggestion.  Here's what I did:

             

            - Selected the first line of the record.

            - Created a new detail template and trap.

            - Made the entire line one field.

            - Set the 'end field on' property to a line count of 3.

             

            It looks like Monarch is starting the field at the right place, but when you do a table view, it only captures the first line.  Lines 2 & 3 don't appear in that one string.

             

            One other thing -- each line of the record is 128 characters long with a line feed at the end.  If all three lines exist, the record length will be 384 characters in length.

             

            Also, I'm working in Monarch Pro 7.  If you have an email address, I can send you a sample of the report to look at. 

             

            Let me know, and thanks in advance for your help!

            • Multi-Line Record Help
              Grant Perkins

              Hi CLK,

               

              OK, I will provide my email via a private message but you don;t have that option turned on at the moment. Could you modify your member profile to allow that for a short while?

               

              As for the field, you need to set the end field on value to "None of the above". You will not have success with 3 lines in this case because the number of lines varies.

               

              Also change the default field attributes if you have not already done so.

               

              Set the template width to 128 if it is not already what by default from the field creation.

               

              Set the field type to MEMO - this will allow the field to contain more than 254 characters.

               

              You will not be able to see the entire contents of the field on screen unless you change the field to a display 3 lines. However there is also an option to "Show field contents" for the field in which the cursor is located. It usually appears at the top of the table window.

               

              Try those ideas. If they don't work for you, switch your PM option on , and send me a message to which I will respond with my email address.

               

              Good luck,

               

               

              Grant

               

              Originally posted by CLK:

              I tried your suggestion.  Here's what I did:

               

              - Selected the first line of the record.

              - Created a new detail template and trap.

              - Made the entire line one field.

              - Set the 'end field on' property to a line count of 3.

               

              It looks like Monarch is starting the field at the right place, but when you do a table view, it only captures the first line.  Lines 2 & 3 don't appear in that one string.

               

              One other thing -- each line of the record is 128 characters long with a line feed at the end.  If all three lines exist, the record length will be 384 characters in length.

               

              Also, I'm working in Monarch Pro 7.  If you have an email address, I can send you a sample of the report to look at. 

               

              Let me know, and thanks in advance for your help! [/b][/quote]