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 :

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...

Note : 

c_Tgl stored in format : yyyy-MM-dd

  • No labels

1 Comment

  1. date1 and date2 in database table are of string type. You cannot use "between" in your query. cast them accordingly first in your query itself.