views:

276

answers:

1

I have jasper report which accepts Integer parameter . I am using g:jasperreport tag to call the report . body of this tag has input html which gets passed to report.

But's the report is not working. It is giving invalid format exception.

Pl. help

Thanks in advance. Abe

A: 

I found that passing defining the parameter as a String works even in the SQL ie in the jrxml

<parameter name="headerid" class="java.lang.String">
        <parameterDescription><![CDATA[ID this report is for]]></parameterDescription>
        <defaultValueExpression><![CDATA['1']]></defaultValueExpression>
    </parameter>

And Use it in the SQL as you would an Integer ie

where header.id = $P{headerid}
Scott Warren