adityasinghcs Posted April 11, 2015 Share Posted April 11, 2015 Need to pass a parameter of java.util.Collection to a postgres function how I can do that, please let me know step by step. Here is my code But this is thoriwing error from postgres function due to format of array. Please also let me know which data type will I used for this. If their is any way for sending collection value as a string to postgres function then it will also work for me and i will parse data into it from postgres function itself. <?xml version="1.0" encoding="UTF-8"?> sELECT * FROM getAgeAnalysisreportdata($P!{Site_Select2}) ]]></fieldDescription></p><p> </field></p><p> <field name="typeinout" class="java.lang.String"></p><p> <fieldDescription><![CDATA[ ]]></fieldDescription></p><p> </field></p><p> <field name="sitename" class="java.lang.String"></p><p> <fieldDescription><![CDATA[ ]]></fieldDescription></p><p> </field></p><p> <field name="id" class="java.lang.Integer"/></p><p> <field name="recorddate" class="java.lang.String"/></p><p> <field name="crowdsize" class="java.lang.Integer"/></p><p> <field name="siteid" class="java.lang.String"/></p><p> <field name="locationid" class="java.lang.String"/></p><p> <variable name="InOutValue" class="java.lang.Integer" resetType="Group" resetGroup="typeinout" calculation="Sum"></p><p> <variableExpression><![CDATA[$F{valueinout} $F{intervalinout} $F{typeinout} null "Age Analysis" "Displaying Age Analysis estimate" "Age Analysis" $P{Site_Select2} $P{LocationSelect} $P{DateSelect} $P{DataSelectTo} $P{IntervalSelect} $F{intervalinout} $F{typeinout} $V{InOutValue} "Age Group" "Values" Link to comment Share on other sites More sharing options...
ernestoo Posted April 13, 2015 Share Posted April 13, 2015 I can't see your code... Link to comment Share on other sites More sharing options...
ernestoo Posted April 13, 2015 Share Posted April 13, 2015 You should use $X{IN, columnName, parameterName} - this will expand to work correctly (reference: http://jasperreports.sourceforge.net/sample.reference/query/) Link to comment Share on other sites More sharing options...
adityasinghcs Posted April 13, 2015 Author Share Posted April 13, 2015 i dont want to use that. I want to pass parameter itself because what i have to do with the parameter is different then using in clause. I want to pass the same collection paramter anyhow. I dont have any other option. Link to comment Share on other sites More sharing options...
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now