6 Replies Latest reply: May 15, 2014 10:08 AM by Data Kruncher RSS

    Generating Summaries

    mizzfit _

      Hi,

       

      So when I run a large project to generate reports it generates the summary data even if there is nothing there. Can I stop it from generating the file if there is nothing there? So if there is no other data other than the headers I do not want it to generate and XLSX file.

       

      Thoughts?

       

      Thanks,

      Ryan

        • Generating Summaries
          Data Kruncher

          Hi Ryan,

           

          Your challenge is a bit of the reverse of [URL="http://www.monarchforums.com/showthread.php?t=3415"]this post[/URL] but a possible solution could be similar.

           

          There aren't any options to prevent Monarch from running project exports if no data exists in a summary, so we need to tackle this another way.

           

          If we run the export as a temporary file, or first stage test, then we can use the ouput from that test to determine what the next step should be.

           

          You could build a special test model/project configured to have a summary that would not export headers, but would export only a single field from your data set, and only the value of that field in the first row in that set (see the matching tab in the summary definition). Define a project export to output to a control file, say "C:\Test\output.txt".

           

          Using a batch file, load and run this test project. Now read that file into a DOS variable and if it's empty, don't run the real Export, but do run it if there's something in the test output.

           

          Can you get there on your own by referencing the cited post above?