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)
optional date parameter
dchillman
I have added a date parameter to a report and marked it to allow null values. In the initialize event I check to see if it is null, and if so, set it to a value. It works fine in the design environment. When deploying to Maximo I set the parameter as not required. However, when I preview the report and leave the date parameter blank I receive an error "org.eclipse.birt.report.exception.ViewerValidationException: The parameter "{0}" cannot be blank". If I input a value, the report runs as expected. What the heck is going on? How do I set a date parameter as optional? thanks for any ideas.
Find more posts tagged with
Comments
leeysh
<p>Hi <a data-ipb='nomediaparse' class="" href='
http://www.birt-exchange.org/forum/index.php?/user/18553-dchillman/'
title=""><span>dchillman</span></a></p><p> Did you manage to solve this optional date parameter issue?</p><p> </p><p>Thanks & Regards,
Gen</p>
wwilliams
<p>You can do something like this</p><pre class="_prettyXprint">maximoDataSet.open();myWhere = new String();if(params["sDate"].value) {myWhere = " AND poline.enterdate >= " + MXReportSqlFormat.getStartDayTimestampFunction(params["sDate"])}</pre><p>Then in the Sql</p><pre class="_prettyXprint">+ " WHERE PO.ponum=POLINE.ponum"+ myWhere// Include the Maximo where clause//+ " where " + params["where"];maximoDataSet.setQuery(sqlText);</pre>