sasi86 Posted September 28, 2010 Share Posted September 28, 2010 Dear Team, I want to access the PGInterval value as 'y' axis value in stacked 3D bar chart. I set the average call duration as a series and value expression. When preview the report it shows the error that, Cannot cast from PGInterval to Number.How to work on it... Kindly give the solution as soon as possible. The type as follows, <field name="calldate" class="java.sql.Date"> <fieldDescription><![CDATA[]]></fieldDescription> </field> <field name="extn" class="java.lang.Integer"> <fieldDescription><![CDATA[]]></fieldDescription> </field> <field name="avg" class="org.postgresql.util.PGInterval"> <fieldDescription><![CDATA[]]></fieldDescription> </field> The chart data setting as follows, <categoryDataset> <categorySeries> <seriesExpression><![CDATA[$F{avg}]]></seriesExpression> <categoryExpression><![CDATA[$F{extn}]]></categoryExpression> <valueExpression><![CDATA[$F{avg}]]></valueExpression> </categorySeries> </categoryDataset> Link to comment Share on other sites More sharing options...
sasi86 Posted September 28, 2010 Author Share Posted September 28, 2010 Dear Team, I want to access the below fields in the report as well as chart. -> calldate -> extn -> avg(duration) The query as follows, SELECT calldate, extn, avg(duration) FROM incoming_details group by calldate,extn order by calldate, extn; The report shows like, Date Extension Average Call Duration 01/09/2010 501 0 years 0 mons 0 days 0 hours but if we put the query in postgres that fetch the below record, calldate | extn | avg ------------+------+--------------------- 01/09/2010 | 501 | @ 1 min 33.05 secs Kindly help to access the exact value in ireport as well access the avg(duration) value in chart. 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