Discussions
Categories
Groups
Community Home
Categories
INTERNAL ENABLEMENT
POPULAR
PUBLIC CLOUD
PRIVATE CLOUD
Quick Links
MY LINKS
HELPFUL TIPS
Back to website
Home
Intelligence (Analytics)
Library parameter
hatra
<p>I have a date parameter in my library, this date parameter is used in 20 reprots.</p>
<p>I have made the date optional so they can run it as when they wich, but now I want to write a script ( if param not selected pass today dat ) and apply it to the parameter in the library. Can this be done on library since it is common on all reports and if so how and where.</p>
<p> </p>
<p>thanks</p>
Find more posts tagged with
Comments
Clement Wong
<p>A typical event would be to place this code in beforeFactory, but since it's a library...</p>
<p> </p>
<p>Why not have the parameters Default Value be today's date using a JavaScript expression?</p>
<p> </p>
<p>Examples:</p>
<p>BirtDateTime.today();</p>
<p>Formatter.format(BirtDateTime.today(),"YYYY-MM-dd");</p>
<p> </p>
<p> </p>
<p>Unfortunately, we cannot use the Parameter's <em>validate </em>event because if "No Value" is checked and the report is submitted, the <em>validate </em>event will not fire off.</p>
<p> </p>
<p> </p>
<p>Outside of BIRT, you can modify your front-end web site parameters page to do this.</p>
hatra
<p>thanks </p>