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

Casting from String to number


mkeym

Recommended Posts

Hey all,

i get some problems when i try to create a xylinechart in jasperreports.

Is it better if i create timeseries charts or xylinecharts.

I want to explain my behaviour:

I connect to a database from i build reports. at last i need to create charts for this dynamic reports.

All reports depend on time, so i try to use x-axis as time axis and y-axis should be the value axis.

The problem is that my time in database is as string so i cannot create these charts.

can anybody help me how to realise these reports?

Thanks

 

Code:
<field name="DESCRIPTION" class="java.lang.String" /><field name="HALFHOUR" class="java.lang.String" /><field name="VALUEA" class="java.lang.Double" />----<xyLineChart>        <chart evaluationTime="Report">          <reportElement x="0" y="0" width="555" height="350" />        </chart>        <xyDataset>          <dataset incrementType="None" />          <xySeries>            <seriesExpression><![CDATA[$F{DESCRIPTION}]]></seriesExpression>            <xValueExpression><![CDATA[$F{HALFHOUR}]]></xValueExpression>            <yValueExpression><![CDATA[$F{VALUEA}]]></yValueExpression>          </xySeries>        </xyDataset>        <linePlot>          <plot />        </linePlot>      </xyLineChart>
Link to comment
Share on other sites

  • Replies 4
  • Created
  • Last Reply

Top Posters In This Topic

Top Posters In This Topic

Thank you for help,

but when i try this i get this message:

 

Exception in thread "AWT-EventQueue-0" java.lang.NoSuchMethodError: org.jfree.chart.ChartFactory.setChartTheme(Lorg/jfree/chart/ChartTheme;)

Link to comment
Share on other sites

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...