6 Replies Latest reply: May 15, 2014 10:00 AM by Grant Perkins RSS

    multi line records

    Jim J

      Hello all. I am a noobie and need some help with a large report.

       

      I think it was Grant who would say "I think you have landed up at the almost-compulsory-for-people-new-to-Monarch situation where your early involvement requires some advanced and not totally intuitive tricks that, once known, will make life much easier. But they are not covered in the basics!" This about covers my problem.

       

      Generally the data looks like this (I'm noticing the spaces are being truncated in this forum page though)...

       

      I need to flatten out the records between the space lines. Can someone point me in the right direction?

       

      0024246128    U49 008 24225126   DUNAWAY   030108   6                  29,708.32    232.41                                        

                    .0699000        .00000000                                                                               

      0024226136    U49 008 24226136   EWALD     030108   6                  10,131.65     98.36                                        

                    .0999000        .00000000                                                                               

      0024226177    U49 008 24226177   BROWN     030108  22                  51,949.41    419.11                                        

                    .0699000        .00000000                                                                               

      0024226185    U49 008 24226185   WILLIS    030108   6                  34,679.62    281.74                                        

                    .0749000        .00000000                                                                               

      0024226227    U49 008 24226227   WELCH     030108   6                  19,827.75    167.16                                        

                    .0799000        .00000000                                                                               

      0024223372    U49 007 0024223372 SLAPE     030108   8                  92,917.04    907.87                                        

                    .0800000        .00000000                                                                               

      0024223406    U49 007 0024223406 HERREN    120107   5                               302.83    227.24     75.59                    

                    .0950000        .00000000     010108   6                                         226.64     76.19                    

                                                  020108   7                                         226.03     76.80                    

                                                  120107   5      213.84 ES   28,703.51                                                                               

      315.17 SU                                                                               

      0024224743    U49 007 0024224743 RICK      030108   7         .11 EA   91,605.91    891.15                                        

                    .0800000        .00000000                                                                               

      0022691315    U49 008 22691315   CARMONA   090107   5                               609.14    534.90     74.24                    

                    .1075000        .00000000     100107   6                                         534.23     74.91                    

                                                  110107   7                                         533.56     75.58                    

                                                  120107   8                                         532.89     76.25                    

                                                  010108   9                                         532.20     76.94                    

                                                  020108  10                                         531.51     77.63                    

                                                  090107   5                  59,709.57                                                                               

      0024224016    U49 008 24224016   HINKLE    030108  15                               348.61                        252.80     95.81

                                                  040108  18                                                             251.22     97.39

                                                  050108  21                                                             249.62     98.99

                    .0699000        .00000000     060108  24                  42,578.24                                                                               

      0024226250    U49 008 24226250   CORNWELL  030108  13                               426.08                        313.81    112.27

                                                  040108  14                                                             313.16    112.92

                                                  050108  19                                                             310.48    115.60

                                                  060108  20                                                             309.80    116.28

                    .0699000        .00000000     070108  24                  52,720.98

        • multi line records
          henryiriawan _

          Hi Jim,

           

          Could you give more information on "I need to flatten out the records between the space lines."? Or you can give an example on how you would like the data to be gathered?

            • multi line records
              Jim J

              Thanks for replying Henry...

               

              By "flatten out" I mean I need to unwrapped the text. In this data each record is seperated by a blank line. The records may have variable rows, but are guaranteed to have two rows. I need to bring the second row up to the end of the first row, and the third row (if present) up to that same line after the second row data... and so on. I am very sorry if this doesn't make sense. Please let me know where I can clear it up.

               

              By the way. How do we post our report data with the same format as is in our report. I noticed our spaces are being striped when I post here.

               

              Thanks so much!!!

                • multi line records
                  henryiriawan _

                  Hi Jim,

                   

                  Here is the thread about posting a report with a good format.

                  http://www.monarchforums.com/showthread.php?t=2290[/url]

                   

                  About making all the information to a single line, you need to define template. First, you should define which is a certain line that would be your "Detail Template."

                   

                  In your example, I am assuming like this:

                   

                  0024223372 U49 007 0024223372 SLAPE 030108 8 92,917.04 907.87 .0800000 .00000000

                   

                  0024223406 U49 007 0024223406 HERREN 120107 5 302.83 227.24 75.59 .0950000 .00000000 010108 6 226.64 76.19 020108 7 226.03 76.80 120107 5 213.84 ES 28,703.51 315.17 SU[/CODE]

                   

                  On your data, you need to use "Detail Template" and "Footer Template."

                   

                  So, the "Detail Template," you need to choose the line of data that you always be available for a record. For example:

                  .0799000 .00000000

                   

                  Then, you need to make "Append Template" to append the first row of data:

                   

                  0024226227 U49 008 24226227 WELCH 030108 6 19,827.75 167.16

                   

                   

                  However, when I saw these patterns:

                   

                  1. First Pattern

                  0022691315 U49 008 22691315 CARMONA 090107 5 609.14 534.90 74.24

                  .1075000 .00000000 100107 6 534.23 74.91[/B]

                  110107 7 533.56 75.58

                  120107 8 532.89 76.25

                  010108 9 532.20 76.94

                  020108 10 531.51 77.63

                  090107 5 59,709.57

                   

                  2. Second Pattern

                  0024224016 U49 008 24224016 HINKLE 030108 15 348.61 252.80 95.81

                  040108 18 251.22 97.39

                  050108 21 249.62 98.99

                  .0699000 .00000000 060108 24 42,578.24[/B]

                   

                  So, in your report, there are 2 kinds of these patterns?

                   

                  Edit:

                   

                  If you want to make it a single line, and you know that you will have 2 data line for sure, then, you need to capture that two lines as "Detail" template. Then, on the second Row, you need to highlight all Row. Right click and choose "Advanced". On the "End Field On", click "None of the above." Name the highlighted row "Processing Line" (as an example). Then, you need to extract the data from "Processing Line"

                    • multi line records
                      Jim J

                      Thank you Very much for your help Henryiriawan!!!

                        • multi line records
                          Grant Perkins

                          Jim,

                           

                          Henry's observation of the two patterns is important here - does the report really show that symptom?

                           

                          For the earlier lines I would have suggested looking into the Monarch Utility with the intention of unwrapping the lines so that each record becomes a single line OR a single master line with, sometimes, some additional lines (the shorter ones that look like they might start with dates.)

                           

                          However if the format can be as mixed as seems possible from the sample such an approach may not help. However it does look like the format presented by the report may be the key to successfully unravelling it, in which case getting a full understanding of what it does and when will be important.

                           

                          Grant

                           

                          0024246128 U49 008 24225126 DUNAWAY 030108 6 29,708.32 232.41

                          .0699000 .00000000

                           

                          0024226136 U49 008 24226136 EWALD 030108 6 10,131.65 98.36

                          .0999000 .00000000

                           

                          0024226177 U49 008 24226177 BROWN 030108 22 51,949.41 419.11

                          .0699000 .00000000

                           

                          0024226185 U49 008 24226185 WILLIS 030108 6 34,679.62 281.74

                          .0749000 .00000000

                           

                          0024226227 U49 008 24226227 WELCH 030108 6 19,827.75 167.16

                          .0799000 .00000000

                           

                          0024223372 U49 007 0024223372 SLAPE 030108 8 92,917.04 907.87

                          .0800000 .00000000

                           

                          0024223406 U49 007 0024223406 HERREN 120107 5 302.83 227.24 75.59

                          .0950000 .00000000 010108 6 226.64 76.19

                          020108 7 226.03 76.80

                          120107 5 213.84 ES 28,703.51

                          315.17 SU

                           

                          0024224743 U49 007 0024224743 RICK 030108 7 .11 EA 91,605.91 891.15

                          .0800000 .00000000

                           

                          0022691315 U49 008 22691315 CARMONA 090107 5 609.14 534.90 74.24

                          .1075000 .00000000 100107 6 534.23 74.91

                          110107 7 533.56 75.58

                          120107 8 532.89 76.25

                          010108 9 532.20 76.94

                          020108 10 531.51 77.63

                          090107 5 59,709.57

                           

                          0024224016 U49 008 24224016 HINKLE 030108 15 348.61 252.80 95.81

                          040108 18 251.22 97.39

                          050108 21 249.62 98.99

                          .0699000 .00000000 060108 24 42,578.24

                           

                          0024226250 U49 008 24226250 CORNWELL 030108 13 426.08 313.81 112.27

                          040108 14 313.16 112.92

                          050108 19 310.48 115.60

                          060108 20 309.80 116.28

                                        .0699000        .00000000     070108  24                  52,720.98[/code]

                    • multi line records
                      Jim J

                      I guess what I really mean is I need to make fields and records out of a variable number of row data.