jasper reports - Error filling print... java.lang.String cannot be cast to java.lang.Number -
i trying sample report. connected database successfully.
i wrote simple query
select country, population dataset
desc dataset; | country | varchar(25) | yes | | null | | | population | int(9) | yes | | null | |
i have taken blank chart , in used xy line chart. x-axis have given country , y-axis population. when click preview button, getting below error.
error filling print... java.lang.string cannot be cast to java.lang.number java.lang.classcastexception: java.lang.string cannot be cast to java.lang.number at net.sf.jasperreports.charts.fill.jrfillxyseries.evaluate(jrfillxyseries.java:159) at net.sf.jasperreports.charts.fill.jrfillxydataset.customevaluate(jrfillxydataset.java:121) at net.sf.jasperreports.engine.fill.jrfillelementdataset.evaluate(jrfillelementdataset.java:155) at net.sf.jasperreports.engine.fill.jrcalculator.calculatevariables(jrcalculator.java:160) at net.sf.jasperreports.engine.fill.jrverticalfiller.filldetail(jrverticalfiller.java:765) at net.sf.jasperreports.engine.fill.jrverticalfiller.fillreportstart(jrverticalfiller.java:288) at net.sf.jasperreports.engine.fill.jrverticalfiller.fillreport(jrverticalfiller.java:151) at net.sf.jasperreports.engine.fill.jrbasefiller.fill(jrbasefiller.java:909) at net.sf.jasperreports.engine.fill.jrbasefiller.fill(jrbasefiller.java:822) at net.sf.jasperreports.engine.fill.jrfiller.fill(jrfiller.java:61) at net.sf.jasperreports.engine.jasperfillmanager.fill(jasperfillmanager.java:446) at net.sf.jasperreports.engine.jasperfillmanager.fill(jasperfillmanager.java:276) at net.sf.jasperreports.engine.jasperfillmanager.fillreport(jasperfillmanager.java:745) at com.jaspersoft.ireport.designer.compiler.ireportcompiler.run(ireportcompiler.java:891) at org.openide.util.requestprocessor$task.run(requestprocessor.java:572) at org.openide.util.requestprocessor$processor.run(requestprocessor.java:997) print not filled. try use emptydatasource...
please me.
i think need standard line chart not xy line chart.
xy line charts need categories (in case country) , (x,y) point.
Comments
Post a Comment