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

SEND INTEGER LIST OF VALUES TO A PARAMETER


menghile01

Recommended Posts

Hi,

excuse me for my english...

I have to pass integer values ​​to a query, these values ​​will get from this additional query :

SELECT DISTINCT
substr(char(PERIODO_RIFERIMENTO),1,4)||'-'||substr(char(PERIODO_RIFERIMENTO),5,2)||'-'||substr(char(PERIODO_RIFERIMENTO),7,2)as DATE_PER_RIF,
PERIODO_RIFERIMENTO
FROM
DSTBG00F

where [PERIODO_RIFERIMENTO] is the integer value i want to use

I create a parameter of type "java.util.collection"  for use in a further query according to this scheme :

SELECT * FROM ORDERS WHERE $X{IN,PERIODO_RIFERIMENTO, PERIODO_RIFERIMENTO}

unfortunately java.util.collecion does not allow you to use variables of type integer,  how can I fix it?

thanks in advance

Stefano Baricchi

Link to comment
Share on other sites

  • Replies 3
  • Created
  • Last Reply

Top Posters In This Topic

 Hi, Stefano Baricchi

You can insert attribute nestedType to parameter tag in your jrxml

 

<parameter name="paramAbc_Id" class="java.util.Collection" nestedType="java.lang.Integer">
            <defaultValueExpression><![CDATA[ ]]></defaultValueExpression>
</parameter>
 

reference Jasper report schema
http://jasperreports.sourceforge.net/schema.reference.html#parameter

 

Good luck Stefano Baricchi /tools/fckeditor/editor/images/smiley/msn/wink_smile.gif

 

 

Link to comment
Share on other sites

  • 1 year later...
  • 4 years later...

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

×
×
  • Create New...