4 Replies Latest reply: May 15, 2014 9:59 AM by Mike Moore RSS

    Template question

    Mike Moore

      I am using Monarch v6.01 and I am having a problem with a report model.  The text report that I am pulling from has report totals at the bottom that are in the same text format as the detail rows within the report.  The only difference is that the detail rows have a line above the data that says "CUSTOMER :" and the totals have a line that says "REPORT TOTAL" two lines above the total data and then a blank line immediately above the total data.

       

      Is there a way that I can set the filter to exclude the report totals so that all I get off of the report are the actual data rows?

       

      Thanks for any help.

       

      Mike

        • Template question
          Grant Perkins

          Hi Mike,

           

          You could look at the potential for defining an append template that would pick up the line above the detail line block which would then allow you to pick up the existence of absence of CUSTOMER and then use that to filter for the record you want to retain.

           

          However, whilst the idea may be sound I do appreciate that it may not be so easy to define a unique trap that would be effective for your report. It all depends on the format.

           

          In a similar vein you could look for the REPORT TOTAL lines instead and append a flag when they exist but only if there is no CUSTOMER field in the other append.

           

          Of course there may be other approaches which would work specifically for the report in question. If there ideas don't lead to anything you may like to consider whether you could post a brief example of what you have to work with for the forum members to see if any other ideas look feasible.

           

          Does this help at all?

           

          Grant

          • Template question
            Mike Moore

            Grant,

             

            I do currently have page header & append templates set up in the model.  I am using the page header to get the customer information on the CUSTOMER line.  There are 4 rows of number details so I am using the "detail template" line for the first row of numbers and then the append template for the second row of numbers.  I'm not interested in the 3rd and 4th rows of numbers for each customer.

             

            I'm sure there is probably a better way to do it.  Here is a sample of the data format (each column is a month - this is fixed width text but it doesn't display well in this posting):

             

            CUSTOMER : ABC12 - ABC BUILDRS,INC  SLM :   2 - JOHN SMITH           

            SALE $            0        0        0        0        0      310        0        0        0        0        0        0         310

            COST $            0        0        0        0        0      240        0        0        0        0        0        0         240

            G.P. $            0        0        0        0        0       70        0        0        0        0        0        0          70

            G.P. %         0.00     0.00     0.00     0.00     0.00    22.65     0.00     0.00     0.00     0.00     0.00     0.00       22.65

             

             

            GRAND TOTALS

             

            SALE $       269457   213020   235709   280061   188546   158235   315435   199954   102937   115822    58898    70444     1963357

            COST $       235338   184082   203937   241680   164440   137694   280183   178855    85909    98659    49390    60986     1712122

            G.P. $        34118    28937    31772    38380    24105    20540    35251    21099    17028    17163     9508     9457      251234

            G.P. %        12.66    13.58    13.48    13.70    12.78    12.98    11.18    10.55    16.54    14.82    16.14    13.43       12.80

            • Template question
              Grant Perkins

              Originally posted by Mike Moore:

              Grant,

               

              I do currently have page header & append templates set up in the model.  I am using the page header to get the customer information on the CUSTOMER line.  There are 4 rows of number details so I am using the "detail template" line for the first row of numbers and then the append template for the second row of numbers.  I'm not interested in the 3rd and 4th rows of numbers for each customer.

               

              I'm sure there is probably a better way to do it.  Here is a sample of the data format (each column is a month - this is fixed width text but it doesn't display well in this posting):

              [font="courier"]CUSTOMER : ABC12 - ABC BUILDRS,INC  SLM :   2 - JOHN SMITH           

              SALE $            0        0        0        0        0      310        0        0        0        0        0        0         310

              COST $            0        0        0        0        0      240        0        0        0        0        0        0         240

              G.P. $            0        0        0        0        0       70        0        0        0        0        0        0          70

              G.P. %         0.00     0.00     0.00     0.00     0.00    22.65     0.00     0.00     0.00     0.00     0.00     0.00       22.65

               

               

              GRAND TOTALS

               

              |

              SALE $       269457   213020   235709   280061   188546   158235   315435   199954   102937   115822    58898    70444     1963357

              COST $       235338   184082   203937   241680   164440   137694   280183   178855    85909    98659    49390    60986     1712122

              G.P. $        34118    28937    31772    38380    24105    20540    35251    21099    17028    17163     9508     9457      251234

              G.P. %        12.66    13.58    13.48    13.70    12.78    12.98    11.18    10.55    16.54    14.82    16.14    13.43       12.80 /font[/quote][/b][/quote]OK, so it looks something like this? (Ignore the | as I only included it because the extra blank line disappears of I don't).

               

              So you have a 3 line detail record, for you purposes, in every data block you want to use.

               

              First line has customer number, name and your salesperson code. Second line has some number in columns related to Sales and the third line some number related to costs. Are the columns headings always the same? 12 of them plus a total suggest a rolling annual set of numbers by month to me which offers another challenge ...

               

              But ignoring that for now, my initial feeling is that I would use the 3 lines that you require as the data sample for a template, trapping on the word CUSTOMER.

               

              Define the fields you want from all 3 lines.

               

              That's it. The Grand Totals section will be ignored.

               

              If you need any info from the real page header - report date for example - use the Page header append for that.

               

              Now - if your colummn headings are indeed months and change as the months roll by you may need a method of identifying which columns relate to which months. I seem to remember there are some ideas posted in the forum somewhere so if you have the need let us know and we can attempt to find them. The solution will vary according to where the column headers are printed related to the section of the report for each customer.

               

              That said the better and easier option looks like it might be a small Monarch upgrade because your columnar report structure looks to be perfect for the Monarch Multi Column Region functionality which became available with version 7. And that would most likely make the changing column heading a simple to solve problem as well, unless there is something very unpredictable about the layout of the report for the column headings.

               

              Now, I may have missed something that makes this suggestion too simple by far. So if I have let me know and I will revisit the requirements.

               

              I hope this helps until then.

               

              Have fun.

               

              Grant

              • Template question
                Mike Moore

                Grant,

                 

                I think that you hit the nail on the head.  I never considered making the sample 3 lines and filtering for the CUSTOMER in the first line.  I have always made my samples just 1 line and then appended to that.

                 

                I knew that there had to be an easier way.  Thanks for the insight.  I will play with it.  I appreciate your prompt responses and ideas.

                 

                Mike