6 Replies Latest reply: May 15, 2014 9:55 AM by Grant Perkins RSS

    How can I use more than one Multi-Column Region in a report?

    Rhoff _

      I have two regions in a report where I could the MCR to extract the data I want except they are different sizes.  Can I use more than one MCR per report?

        • How can I use more than one Multi-Column Region in a report?
          Grant Perkins

          A nice idea but as far as I know only one MCR definition is possible, though where the MCR stops and starts can be adjusted by using references to various templates in the model.

           

          Sometimes it is possible to define a single compromise MCR that would extract from different areas with slightly different formats BUT that may not help unless the data extracted are for the same fields or can be separated in some other way after extraction.

           

          If the end result requires single record data from both sections I would consider 2 separate models, one for each section format, with a common key field from somewhere and export them. Then use a final process to bring them all together into a single table once again and export as required from there.

           

          (It is possible that the second model can also import the data extacted by the first model - assuming you have the Pro version available.)

           

          HTH.

           

          Grant

          • How can I use more than one Multi-Column Region in a report?
            Rhoff _

            When I use the MCR I only want to capture what is in the box on the screen.  But, the data I trap also includes some numbers from lines below the MCR boxes.  I don't want this data but cannot seem to keep it from being extracted from the report. Is there any way to only have the fields captured from the data defined in the MCR box?

            • How can I use more than one Multi-Column Region in a report?
              Grant Perkins

              Originally posted by Rhoff:

                Is there any way to only have the fields captured from the data defined in the MCR box? /b[/quote]The MCR definition from the Templates menu allows you to define where a region starts and stops.

               

               

              With a little experimentation you will, hopefully, be able to define a couple of templates that can be used to set the start and stop points. MCR will apply in the line between them.

               

              The template may be 'real' (you need some data they contain) or 'dummy' (you don't need any of the data present but there is a convenient trap available.)

               

              That should give you some control. However sometimes it doesn't work out well with the report. In which case don't worry too much about extracting stuff you don't want. Just look for a way to filter it out of the data table you really want to work with. Even in the worest case scenario that will be successful most of the time.

               

              If it isn't you may be dealing with a report that demands extreme measures - in which case we may need to consider the techniques known as 'Voodoo Monarch'.

               

              I would recommend trying the MCR start and end controls first - though secretly I hope they fail and we can move into the most challenging arena known to Monarch users!     :eek: 

               

              Have fun.

               

               

              Grant

              • How can I use more than one Multi-Column Region in a report?
                Rhoff _

                Grant,

                I was able to get what I needed with some pain.  I used the multi-line capture as a meno field.  This way I could stop it when I needed to.  I then exported to a txt file then I could use the MCR correctly and it captured only the data I needed.  I had to do this twice with the same file to get the two different sets of data I needed.  Now I want to impress the accounting people and automate this entire process with a command line.  This brings me to my next question.  If the project has a project export named Export1 how can I use the command line to open the project and run this export?

                • How can I use more than one Multi-Column Region in a report?
                  Grant Perkins

                  Originally posted by Rhoff:

                     This brings me to my next question.  If the project has a project export named Export1 how can I use the command line to open the project and run this export? /b[/quote]Sounds good so far - sometimes these darned reports can prove very reluctant to give up their information!

                   

                  For the automation at the simple level (ie my level!) you need a command batch file - some good examples in the help files to start you off. (The real Pros write VB programs and stuff but I don't think you absolutely need that here.)

                   

                  In general terms then ...

                   

                  Save you first extract as a PROJECT (.xprj file) which will assume a known input file (or include the ability to specifiy an input file by user) and have it export your first extract to a known directory and file name.

                   

                  Have your second extract read that file and run its model against it again giving a known output. Save that as another project.

                   

                  And so on if required.

                   

                  Running .xprj files in the command file lines should be much easier than running the components separately so just make them a line at a time follwing your manual steps through the process.

                   

                  The sections on using command lines in the help does cover it but make sure you read all the additional sections that have been included as releases have been added.

                   

                  See what you get. If you get stuck I (or someone else who may use these things more regularly) will be able to assist.

                   

                  I would offer more but I'm a bit short of time right now - will check how you are getting on tomorrow.

                   

                   

                  Grant

                  • How can I use more than one Multi-Column Region in a report?
                    Grant Perkins

                    To add a little detail to the above ...

                     

                    A PROJECT is a .xprj file grouping a report and Model and their locations in the computer environment you are using. Within a PROJECT you may have a PROJECT EXPORT definition which specifies one or more named export tasks.

                     

                    Invoking the PROJECT will open the Data Source and Model. From a command line this can be done using the /prj:[Project File][/b] Command Line parameter. Using this parameter means you do not have to specify the Rpoert and Model parameters in the command line, though you may specify an alternative report to be usind in the process if you wish.     

                     

                    To run the pre-defined PROJECT EXPORT you need use the /px:[jobname][/b] parameter to export a selected Export definition or the /pxall /b if you want all of them or perhaps have only one export defined.

                     

                    The export expects that you will specify where the exported file will go and what it will be called.

                     

                    So long as the second part of your process also has a PROJECT defined to open that file or use it as an External Lookup of some sort using the same file name and location it can be run and the results exported in the same way.

                     

                    Or you could include another line in the command to copy the first exported file somewhere else and maybe rename it and the make use of that version or the second step in the proces.

                     

                    And so on for as many steps as you need.

                     

                    Chapter 9 of the Monarch Help is where you need to read - starting with the overview but checking for the extra V8 and V8 Pro parameters listed a few screens down from the start.

                     

                    2 things to watch out for.

                     

                    The examples often start the line to initiate Monarch simply by using "Monarch". That is fine if Monarch.exe is in your PATH. If not you need to specify exactly where it is and often it safer to do that anyway, especially if the command file may be run from another machine at some point.

                     

                    Secondly you are likely to have spaces in things like folder and file names so always include the component parts of the command line in their own individual quote marks.

                     

                    Something like this;

                     

                    "C:/Program Files/Monarch.exe" /prj:"Project1" /px:"Export1"

                     

                    or maybe

                     

                    "C:/Program Files/Monarch.exe" /prj:"Project1" /pxall

                     

                    HTH.

                     

                     

                    Grant