SEND INTEGER LIST OF VALUES TO A PARAMETER

0

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

menghile01's picture
Joined: Nov 8 2007 - 7:14pm
Last seen: 5 months 3 weeks ago

1 Answer:

1

 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 

 

 

wanatchapong's picture
Joined: Sep 16 2012 - 10:44pm
Last seen: 4 years 12 months ago

add this code in xml and it worked, I hardly the solution.

<< NestedType = "java.lang.Integer" >>

many thanks add this code in xml and it worked, I hardly the solution.

<< NestedType = "java.lang.Integer" >>

many thanks wanatchapong

autocopiante - 3 years 1 month ago
Feedback
randomness