我想報告樣本。我成功連接數據庫。錯誤填寫打印...... java.lang.String中不能轉換到java.lang.Number中
我寫了簡單的查詢
select country, population from dataset
desc dataset;
| country | varchar(25) | YES | | NULL | |
| population | int(9) | YES | | NULL | |
我已經採取的空白圖表,在此我用XY線圖。 X軸我給了國家和y軸人口。當我點擊預覽按鈕時,我收到錯誤。
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 to use an EmptyDataSource...
請幫幫我。