8 Replies Latest reply: May 15, 2014 10:00 AM by glennes _ RSS

    Trapping blank lines

    glennes _

      I am trapping data from a report which is built such thatthere are totally blank lines interspersed within the data lines I need to extract. Fortunately, with V9 and the "NOT" trap, I've finally been able to build a detail trap that captures every occurrence of data I need to pull from this poorly-designed report. The only thing left is to modify the trap so that it ignores blank lines when they occur within the trapped data. Every record trapped now includes a blank first line in the trapped data. This is causing the footer totals to attach to the previous record instead of the current one. Other blank lines cause other issues. If there were some way to tell Monarch to ignore these blank lines, logically capturing only the non-blank lines, all would be fine.

       

      How can I do this? (Or, how come Monarch won't do it, if that's the case?)

        • Trapping blank lines
          Data Kruncher

          Hello, and welcome.

           

          It would be really helpful if you could please post a sample of your report, using the CODE tags (with the # icon).

           

          Thanks,

          Data Kruncher

            • Trapping blank lines
              glennes _

              I'll be glad to...

               

              How do I post a sample using CODE tags (with the # icon)?

               

              Thanks,

              Glenn Stearns

                • Trapping blank lines
                  glennes _

                  Here's a shot at it...

                   

                  AR Detail Aging                            NORMENT SECURITY GROUP, INC.                            January 31, 2008                           Page 1 

                   

                  Selection limited by Account # 1100-1105,   Organization Unit 100-6380,   Use job ou as sales ou (Y/N) N,   Age by Due Date? (Y/N) N                 

                      Age by minimum aging date Y/N? Y,   Print all of open invoice Y/N? Y,   Work Order Detail? (Y/N) N                                               

                  Sorted by Organization Unit, Source Currency Id, Customer Name, Job Id, Invoice #, Account #, Invoice Date                                                                               

                  STAT      -


                  OPEN AR LINE AMOUNTS -


                    DAYS                    DISCOUNT

                    INVOICE            DATE        ACCOUNT            CD           CURRENT       31 - 60       61 - 90       OVER 90    TOTAL     RETENTION     AVAILABL

                   

                        • OU Id 100 NORMENT SECURITY GROUP, INC. ****                                                                               

                      • Source Currency Id USD U.S. DOLLARS ***                                                                               

                    • Customer 3998 1ST CLASS GLASS     402-15-3002   Contact: RENSHAW, BILL **                                                                       

                      

                  • Job 991403 BEADLE MIDDLE SCHOOL *                                                                               

                  99140301           04/30/07      1100                                                                      48,020.00   (276)                         

                                     07/30/07                                                                                19,000.00-                                

                                     01/28/08                                                                                15,000.00-                                                                               

                  -


                  -


                  -


                  -


                          -


                  -


                       

                    • Cus 3998 Totals **                        14,020.00             .00           .00           .00     14,020.00                  .00          .00

                   

                   

                     

                    • Customer 4085 ALABAMA GAS CO      **                                                                               

                  • Job 1002602 ALAGASCO/ TARRANT PINSON FAC *                                                                               

                  100260201A         08/29/07      1105                                                                                (155)     3,932.00            

                   

                   

                      

                  • Job 1002604 ALAGASCO/ TARRANT PINSON FAC *                                                                               

                  100260401A         08/29/07      1105                                                                                (155)    21,083.08            

                   

                       

                    • Cus 4085 Totals **                        25,015.08             .00           .00           .00           .00            25,015.08          .00

                   

                   

                     

                    • Customer 2232 COUNTY OF ALAMEDA GSA BMD      **                                                                               

                  • Non Job Items *                                                                               

                  103365             01/31/08      1100                             3,238.00                                               (0)                         

                                                   1100                               283.43                                               (0)                         

                     CA SALES TAX INV 103365                                                                               

                  1100                                55.00                                               (0)                         

                     FREIGHT INV 103365                                                                               

                  -


                  -


                  -


                  -


                          -


                  -


                       

                    • Cus 2232 Totals **                         3,576.43        3,576.43           .00           .00           .00                  .00          .00

                   

                   

                     

                    • Customer 1792 AM CONSULATE GENERAL        Contact: GSO **                                                                               

                  • Non Job Items *                                                                               

                  30361701           01/14/08      1100                               346.46                                              (17)                         

                     FREIGHT INV 30361701                                                                               

                    • Customer 1329 AMERICAN EMBASSY - NEW DELHI     011-91116889033   Contact: OLIVER, MARY **                                                       

                      

                  • Job 50013803 US CONSULATE KOLKATTA *                                                                               

                  5001380301         01/24/08      1100                            43,200.00                                               (7)                         

                   

                   

                   

                   

                   

                  Run February 20, 2008 2:54:39pm                           Retain                                 Non-Confidential                                ARR00

                   

                   

                   

                  AR Detail Aging                            NORMENT SECURITY GROUP, INC.                            January 31, 2008                           Page 2 

                   

                                                                     STAT      -


                  OPEN AR LINE AMOUNTS -


                    DAYS                    DISCOUNT

                    INVOICE            DATE        ACCOUNT            CD           CURRENT       31 - 60       61 - 90       OVER 90    TOTAL     RETENTION     AVAILABL

                   

                        • OU Id 100 NORMENT SECURITY GROUP, INC. (continued) ****                                                                               

                      • Source Currency Id USD U.S. DOLLARS (continued) ***                                                                               

                    • Customer 40041 AMERICAN EMBASSY ANKARA      **                                                                               

                  • Job 50008803 US EMBASSY ANKARA *                                                                               

                  /code

                    • Trapping blank lines
                      glennes _

                      Assuming the report copy/paste above is reflected accurately on the reader's end, here are a couple of notes about it.

                       

                      Assume line #1 is the first line of text, beginning "AR Detail...".

                       

                      Counting from there, lines numbered 14, 20, 21, and 26, are representative of the blank lines I want to ignore throughout the report.

                       

                      Thanks in advance for your kind help! I'll be glad to clarify further, if need be. Just ask!

                       

                      Glenn Stearns

                        • Trapping blank lines
                          Data Kruncher

                          Do you need to extract the freight and sales tax invoice numbers Glenn?

                            • Trapping blank lines
                              glennes _

                              Yes, I do. Is there some way I can send you the effect of the current Detail trap like it is grayed-out on my screen? It would certainly give you a better look at what I need vs. what I have so far.

                               

                              Glenn

                              • Trapping blank lines
                                Data Kruncher

                                I think I've got this solved Glenn. Only had to pull a couple of tricks out of the bag.

                                 

                                Detail template trap: Numeric OR traps in columns 73, 116 and 137

                                 

                                2 append templates for the job and customer data: nothing fancy, but paint all of each as one big field

                                 

                                Extra invoice number append template: Start with a 2 line sample. Traps Numeric OR in column 1, Numeric in column 34, and the same Numeric OR traps as the detail template.

                                 

                                I named the extra invoice data "Pre Extras" and made it 40 characters wide.

                                 

                                The Extras trap captures more than you want, but it does get what you need properly, so we use a calculated field to clean things up a little.

                                 

                                In a calculated field named Extras, I used this expression:

                                [SIZE=2]if(left(,1)=" ","",[Pre Extras])[/SIZE][/code]

                                 

                                Then hid the Pre Extras field in the table.

                                 

                                You may need to modify the Detail and Extras traps to get the 31-60 and 61-90 amounts in the rest of the report.

                                 

                                You can then slice and dice the customer and job fields with some function work as/if necessary.

                                 

                                Does that work for you? I can send my model if necessary.

                                 

                                Edit: Overlooked mentioning that a filter removes unwanted totals from the table.

                                 

                                HTH,

                                Kruncher