'm finding that using the preview tool is ignoring the parameters that I'm passing. This is for old reports that I built months ago and have always worked perfectly. I'm entering the values in the preview window, but according to the SQL it's seen as null values when they aren't!
I recently upgraded , only from 6.0.1 to 6.1.1 I think.
The way I deal with parameters is I have a user-editable one, e.g.
<parameter name="MerchantID" class="java.lang.Integer"/>[/code]
And then a hidden parameter that generates the SQL for the where clause:
<parameter name="MerchantID_Query" class="java.lang.String" isForPrompting="false"> <defaultValueExpression><![CDATA[$P{MerchantID} == null ? "" : " AND gr.MERCHANT_ID = " + $P{MerchantID} + ""]]></defaultValueExpression> </parameter>[/code]
But all that gets passed is null, so the parameters have no effect. I've tried various options and have been deliberately breaking the code so that I can see the full generated SQL in the error pop-up. But it keeps passing null despite that being a value - I just don't get it!
Any ideas?