8 Replies Latest reply: May 15, 2014 10:06 AM by Grant Perkins RSS

    Multiple reports in 1 file

    emanc2k _

      I have this one file that has multiple reports concatenated under each other. i.e.

       

      Report 1

       

      detail...

      detail...

      detail...

       

      Report 2

       

      different detail...

      different detail...

       

      Report 3

       

      etc....

       

       

      Is there a way to have monarch use a template between each report?

        • Multiple reports in 1 file
          Data Kruncher

          If you've really got multiple reports, each with their own layout, housed within a single file, then it's probably best to develop individual models for each report section.

           

          You can always create a short batch file to process each model sequentially if you'll be using them regularly.

           

          Kruncher

            • Multiple reports in 1 file
              Olly Bond

              Hello emanc2k,

               

              Kruncher's absolutely right - one detail template per model, one model per project, so this can be solved easily with a multi-project batch file.

               

              One tricky point (that I faced today with some wretched HTML logs) was that different reports might appear in the same file in a way where you can't distinguish between the detail lines.

               

              Here, you can use an Append template on a header and then a filter in the table window to restrict the data to just the section you want. In extremely badly-behaved data, you might need to create a Footer template to avoid picking up "bad" detail matches below your desired selection also.

               

              Do please post a sample if your data isn't too secret and we'll happily help.

               

              Best wishes,

               

              Olly

                • Multiple reports in 1 file
                  emanc2k _

                  Thanks guys.  That was what I ended up doing.  I was just curious if there was an elegant monarch way to solve the problem.

                    • Multiple reports in 1 file
                      Olly Bond

                      Hello emanc2k,

                       

                      A more elegant way would be to deliberately trap all the different details using one template, and to use the appends/footers to distinguish the records in the table, and then to use calculated fields to give you the output you want and have multiple exports of the table based on different filters.

                       

                      Depending on the data, that might be possible from one model.

                       

                      HTH,

                       

                      Olly

                        • Multiple reports in 1 file
                          Grant Perkins

                          A long shot.

                           

                          A few years ago there was an example discussed in this forum of a single report that appeared to have reports with several different formats contained within.

                           

                          After a little study of it I noticed that although the content of the sections was marginally different the format was actually the mostly the same except that some sections missed a couple of columns on the right.

                           

                          The report was presented centred on the page so the format seemed completely inconsistent  - until I removed all leading spaces on each line. Once that was done all the formats were the same (bar the missing columns) and it became possible, iirc, to extract all the sections with unique ways to ID each section from a single Monarch extraction and subsequent filtering.

                           

                          Just thought I would mention it incase you have something similar. If not what you have done would be the way to go unless you fancy running a first step to modify the format and anable a single model to be run against the new format.

                           

                          HTH.

                           

                           

                          Grant

                            • Multiple reports in 1 file
                              SSeb _

                              I'm having an issue with a report file this is similar. I also have a file that contains multiple reports. To apply multiple models to this report we daisy chained the file paths. (Report comes in to intial directory, model one is applied, filed is moved to second directory, the second model is applied...)

                               

                              The problem I am having is the able view works great, but when I select the report view I see the entire file. How do I extract just the report I want for report viewing? It have to be missing something simple...

                                • Multiple reports in 1 file
                                  Data Kruncher

                                  To apply multiple models to this report we daisy chained the file paths. (Report comes in to intial directory, model one is applied, filed is moved to second directory, the second model is applied...)[/QUOTE]

                                   

                                  I'm not too sure as to why you'd want to use sort of approach, but hey, whatever works for you.

                                   

                                  The problem I am having is the Table view works great, but when I select the report view I see the entire file. How do I extract just the report I want for report viewing? It have to be missing something simple...[/QUOTE]

                                  Would it be suitable to start with the first record selected in the Table window and then just hit Ctrl-F5? That'll take you to that record in the report window.

                                   

                                  Of course the prior portion of the report will still be there. Not to be obvious or demeaning in any way, but the best way to address that is by not collating multiple reports in the first place.

                                  • Multiple reports in 1 file
                                    Grant Perkins

                                     

                                    The problem I am having is the able view works great, but when I select the report view I see the entire file. How do I extract just the report I want for report viewing? It have to be missing something simple...[/quote]

                                     

                                    If you have loaded multiple individual report files you have the opportunity to select each report window separately but if they are all in one file that is what you will get.

                                     

                                    Potentially, if the multiple reports alwatys arrive in a single file and you have no way to split them prior to Monarch you could consider using Monarch to break the entire report sections out into individual files. There are methods for doing this if the original file contains enough information to cleanly separate the sections. As a basic outline you need to be able to identify the start and end of a 'report', select each entire line as a single field, add a calculated field to ID the report and to be used as a filter, filter the resulting table and then export to a file.

                                     

                                    That said if you are then going to use the result for further analysis then in most cases you may as well just get on and do that from the single file once you have established the filter. And of course that is also where Kruncher's F5 key suggestion comes into its own when your table is filtered.

                                     

                                    HTH.

                                     

                                    Grant