Note that there are some explanatory texts on larger screens.

plurals
  1. POBirt Reports - Don't generate an empty report
    primarykey
    data
    text
    <p>I have several Birt Reports that I am trying to set up to run on a cron job that will email pdfs of the reports every morning. Everything is working fine as far as the generation and emailing goes; the only issue I am stuck with is this: if there is nothing to report, a pdf with just the report title is generated and emailed (a blank report, basically). I'd like to stop this report from being generated at all, so i can skip the emailing, if the pdf file does not exist.</p> <p>I have been all over Google for two days now, and the closest I can find is this: <a href="http://www.eclipse.org/forums/index.php/t/458779/" rel="nofollow">http://www.eclipse.org/forums/index.php/t/458779/</a> in which someone was trying to solve a similar problem and received a push in the right direction, but not a complete solution.</p> <p>It appears as if this can be done during the <code>beforerender</code> script... but how? I know I need to:</p> <ol> <li><p>set a persistent global variable in the <code>oncreate</code> if there is indeed data to report.</p></li> <li><p>get the persistent global variable in the <code>beforerender</code> script.</p></li> <li><p>send the magic <code>don't generate report</code> command.</p></li> </ol> <p>I'm doing all of generating and emailing from a php script, not Java, so I can't send commands like <code>IEngineTask.cancel()</code> (or can I???)</p> <p>Yes, I know I can make a row in the report that says "No data to report", but that's not what my users want.</p> <p>And yes, I could query the database outside of the report to determine if there is valid data to report or not, but i'd prefer not to.</p> <p>And maybe I could even open and read the pdf, programmatically to see if there is anything there, but that sounds like more of a hassle than it's worth...</p> <p>So, how do I do this?</p> <p>Thanks. </p>
    singulars
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload