我試圖通過傳遞整數參數來使用Struts2來運行jasper。但我得到一個錯誤的jasperreports in struts2
cannot assign instance of net.sf.jasperreports.engine.base.JRBaseTextField to field
net.sf.jasperreports.engine.base.JRBaseParagraph.paragraphContainer of type
net.sf.jasperreports.engine.JRParagraphContainer in instance of
net.sf.jasperreports.engine.base.JRBaseParagraph
我用我
parameterMap.put(parametername, param);
connection = dbc.getConnection();
JasperPrint jasperPrint = JasperFillManager.fillReport("jasper.jasper", parameterMap, connection);
JasperExportManager.exportReportToPdfFile(jasperPrint,"jasper.pdf");
請任何一個可以幫助我解決這個問題
你有沒有檢查你的模板的iReport的幫助(通過預覽功能)? –
是的,我已經檢查並能夠產生正確的預覽 – minisha