8 Replies Latest reply: May 15, 2014 10:01 AM by Nick Osdale-Popa RSS

    Define blank lines as Header

    wmfang _

      Hi:

       

      I have a problem here that needs help. I have a multi columned 3 identical detail line that some times broke off by page break and leaves 4 totally blank lines in between, I was not able to get any data after the break.

       

      I need to know how to do a header template on those 4 blank lines so Monarch can skept the page break. So far I come up with no success results.

       

      Any ideas? Your help is greatly appreciated.

       

      Wei-Mei

        • Define blank lines as Header
          Grant Perkins

          Welcome to the forum Wei-Mei.

           

          I think the answer to your question may be much influenced by the specific format of the report. If you can post an accurate example (but with any confidential information made anonymous) it is likely to be vry helpful.

           

          So long as you don't use the MCR functionality you could define any single blank line to be a Page header. 4 lines together would be seen as 4 pages but the detail template will still work as far as I can tell. (I checked using V9 but expect V8 to be the same for this functionality.)

           

          MCR use does not work well over page breaks as far as I can tell. The MCR definition looks fine but the field extraction processing may not be as expected.

           

          The alternative is to use an approach that may require extracting data in a block and then 'slicing and dicing' the resulting fields into the fields you really need using calculated fields and text manipulation functions. That is where the report's format becomes important in working out the best approach to use.

           

          HTH.

           

           

          Grant

            • Define blank lines as Header
              wmfang _

              Grant:

               

              The following is a sample of my report.

               

              ==========================================

              size             24     26     28.......................

              ==========================================

              Red             10     20     30........................

              Red             40     50     60........................

              Red             70     80     90........................

               

              The resault that I need to get is as follow:

               

              Fields:     sold       Recv     On hand

              Red-24  |   10    |     40   |       70

              Red-26  |   20    |     50   |       80

              Red-28  |   30    |     60   |       90 ..............................

               

              As you can see, I do need MCR to do the job. I just don't know how to solve the problem when page brack happens between the 3 lines of data under "Red". The page break always leaves 4 blank lines at various places.

               

              Any help you can give me is greatly appreciated,

               

              Wei-Mei

                • Define blank lines as Header
                  Grant Perkins

                  Hi Wei-Mei,

                   

                  Are the column headings always consistent for an individual report or do they vary with the content of the columns? For example if there were no quantities of size 24 would the column still exist?

                   

                  For the detail rows, is there any other text that identifies the line as being Sold, recv or On-Hand or are you able to make that decision because each of the three rows is always there and always the same row type for each row. (Which is easy enough to do for the report but gives us less identification to work with in Monarch ...)

                   

                  As you say, MCR would be perfect except for the problem.

                   

                  I am also interested to know what you are using for trapping the detail and append templates. If we need to deal with this a different way the trap options could become a key to the solution.

                   

                  I assume the number of columns could be variable but is there an upper limit that you know will not be exceeded?

                   

                   

                  Grant

                    • Define blank lines as Header
                      Grant Perkins

                      Wei-Mei,

                       

                      One option here is to re-format the report using Monarch. It makes for a two step process but that may not be a big deal and can be automated easily enough if it is something you will run frequently.

                       

                      Step one would be to create a model that simply grabs all of every line.

                       

                      In the table, filter to retain only lines that are not blank (based on your description but there may be other considerations as well.)

                       

                      Export the result using a fixed font (for consistent formatting) to a new report file. Now build a model against you new report file using MCR functionality. If all records are 3 lines plus 3 for the header (per your example) you should be able to set a value for the number of lines on a page (a virtual page break) that will avoid splitting a record.

                       

                      If you need to get some results out quickly I would go that way and look for a one step solution, if you still feel the need for one, in slower time.

                       

                      How does that sound?

                       

                       

                      Grant

                        • Define blank lines as Header
                          wmfang _

                          Grant:

                           

                          Grab all line as a table was a good idea but my records are not all the same number of lines. Every color has 3 lines but I have various colors. So that's not going to work. We'll have to go the slower way and figure out somthing else.

                           

                          To answer your questions as following:

                           

                          1. the column headings various with different sizes, some has less, some has more, that why I need to catch every column headings. But the upper limit is 15 columns, my model traps all 15 columns and filter out the ones that was zero.

                           

                          2. The detail rows actually look like this,

                          ==========================================

                                                           -


                          sold/received/on-order----


                                                  

                          size 24 26 28.......................

                          ==========================================

                          Red 10 20 30........................

                          Red 40 50 60........................

                          Red 70 80 90........................

                           

                          Each of the 3 rows is always there and always the same row type of each row. I trap all 3 detail lines as detail and trap the header lines as append.

                           

                          3. In our report, we don't really use color names, we use color code (numbers). My trapping code for detail line is "BBnnB" for 3 lines. Trapping code for append is "SIZE".

                           

                          Hope this give you some ideas. Thank you so much for your help,

                           

                          Wei-Mei