6 Replies Latest reply: May 15, 2014 10:12 AM by elginreigner _ RSS

    Opening multiple reports using wildcards

    LManzo _

      Does anyone know of a way to configure Monarch projects to open all files within a folder without specifying exact file names?

       

      As an example, C:\Reports\*.PDF.

       

      Thanks!

        • Opening multiple reports using wildcards
          adonis _

          I am not sure about that, honestly from my understanding is that it looks for a standard naming convention with the same templated file, otherwise you open a file and have issues if the format changes. 

           

          perhaps the great Olly or others may have insight to this, I am not sure that is possible.

           

           

          Opening Multiple Instances of a Report

           

          With Monarch you can work with multiple instances of a report at the same time. This feature is useful for viewing or analyzing data from a series of reports. Data extracted from all reports is concatenated to form a single Table window database, just as though the data were extracted from a single large report.

           

          Note: This feature cannot be used to extract data from multiple dissimilar reports. Since only a single set of data extraction templates (i.e., a single model file) applies to all open reports, data extracted from dissimilar reports will not produce a sensible Table window database.

           

          To open multiple instances of a report:

           

          Select File, Open Report (ALT, F, R) to display the Open Report dialog.

           

          Select an instance of the report from the file list, then choose Open. Monarch opens the report and displays it in the Report window.

           

          To open subsequent instances of the report:

           

          Select File, Open Report (ALT, F, R) to display the Open Report dialog.

           

          Select another instance of the report from the file list, then choose Open.

           

          When a second or subsequent report is opened Monarch displays the Retention Options dialog. This dialog provides options for retaining (or discarding) any currently open report files and model file prior to opening a second report.

           

          Select the Retain Current Reports option, then choose OK.

           

          The new report replaces the previously opened report in the Report window. The Report window displays only a single report at-a-time. To switch from one open report to another, use the Previous Report  and Next Report  buttons on the toolbar (or use the Report command on the Window menu).

           

          Repeat steps 1 - 3 to open subsequent instances of the report.

           

          Opening Multiple Reports from the Same Folder:

           

          To open multiple reports that reside in the same folder, use the Open Report dialog's multiple selection feature.

           

          Select File, Open Report (ALT, F, R) to display the Open Report dialog.

           

          Select a report from the file list.

           

          Use Ctrlclick or Shiftclick to select additional reports.

           

          Ctrl+click adds the report you click on to the selection.

           

          Shiftclick extends the selection to include all reports between the previously selected report and the newly selected report. Note that Shiftclick will deselect any selected reports that fall outside this range.

           

          Note: The Open Reports or Projects dialog maintains a buffer of 16384 characters that it uses to temporarily store the path to the report folder along with the names of the report files you select. The buffer should be large enough for most practical use, but it is possible to reach the limit by selecting a large number of files or by selecting several files with very long names. If you exceed the limit, Monarch will not open any of the files you selected. In this case, open only some of the files, then select File, Open Report again to select the rest.

           

          Choose Open.

           

          If one or more reports are already open, Monarch displays the Retention Options dialog. This dialog is presented only once for all selected reports.

           

          Note: Monarch opens the reports in the order that their file names appear in the File Name box. Due to the behavior of the Open Reports or Projects dialog (a common dialog provided by the Microsoft Development environment) the order in which the report file names appear in the File Name box is usually not the order in which you selected the reports. Unfortunately, there is not an easy way, other than manually editing the contents of the File Name box, to set the order in which the report names appear. Therefore, the multiple selection feature should be used only if you are unconcerned with the order in which the reports are opened. If you need to open multiple reports in a particular order, either manually open each report or create a project file to open all of the reports. See Project files.

            • Opening multiple reports using wildcards
              Olly Bond

              Hello LManzo, hello Adonis,

               

              Monarch DataPump allows for you to open *.txt, *.pdf, *.html etc as part of a project input definition. You have to build the project and model in Monarch using some literal filenames, then in the DataPump XPRJ Editor you can change the input tab to look for wildcard filenames instead.

               

              If you don't have access to DataPump, then there is a hack. You can create a listing of the directory using the DOS command DIR. Let's say you want to open all the .txt files in a folder called "C:\FILES". From a DOS command window, navigate to the folder and type dir *.txt >listing.prn

               

              Now you can open the listing.prn in Monarch, and you have a couple of options. It's easy to extract the filenames from the listing.prn, and using these you can either create a neat text file just listing the filenames:

               

              file1.txt

              file2.txt

              file3.txt[/CODE]

               

              from which a programmer could call Monarch to execute the model against each file in turn. Alternatively, you could create a calculated field containing a batch file command to call Monarch, and export this as a fixed width text file called batch.bat, and then run that.

               

              Please note, that both of these options will run Monarch against each file in the folder in turn, so you won't have multiple files open in Monarch at once. To distinguish data according to the source file, the File() function can be called in your model.

               

              Hope this helps,

               

              Olly