Jump to content
We've recently updated our Privacy Statement, available here ×

matt_23

Members
  • Posts

    5
  • Joined

  • Last visited

matt_23's Achievements

Rookie

Rookie (2/14)

  • Week One Done
  • One Month Later
  • One Year In
  • First Post Rare
  • Conversation Starter Rare

Recent Badges

0

Reputation

  1. Hi Javier I did try that method as well and got the same results as my normal methods, the parameters were getting ignored. In the end, I managed to fix the issue. Although the 'check for update' tool was saying I had the most up to date version, I checked the Jasper website and discovered I didn't (was on 6.0.1 not 6.2.x). A full reinstall later and it started working as expected again.
  2. '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?
×
×
  • Create New...