You are viewing an old version of this page. View the current version.

Compare with Current View Page History

« Previous Version 2 Next »

Based on a quick tutorial from ?Parameter Jasper Report , i'm trying to make a date range value as paramete to Jasper Report using Jaspersoft iReport Designer 5.6.0 as attached in iReport Designer DATERANGE.txt with Parameter :
and Custom Header :

<form action="" method="GET">
     <div>
         <label>date1</label><input type="date" name="date1" value="#requestParam.date1#"/>
     </div>
     <div>
         <label>date2</label><input type="date" name="date2" value="#requestParam.date2#"/>
     </div>
     <div>
         <input type="submit" name="submit" value="Submit"/>
     </div>
</form>
but resulted an error message :

" Invalid Jasper Report Definition (JRXML)
Cause:
java.lang.String cannot be cast to java.util.Date "

Then I changed the parameter from "date" to "text" and replaced
<parameter name="date1" class="java.util.Date"/>
to
<parameter name="date1" class="java.lang.String"/>

and unfortunatelly resulted a blank page.

I hope someone can help me about this case, thank you...

  • No labels