Leonardo
发贴: 9
|
于 2005-12-27 16:37
最近接触到到jasperReport,感觉入手很难,而且,中文的资料也很少,希望用过这个咚咚的高手给点意见。入手时出现了编译.jrxml的问题。 部分源代码如下: public boolean compile(HttpServletRequest request, HttpServletResponse response) throws Exception{ boolean ret = false; JRProperties.setProperty( JRProperties.COMPILER_CLASSPATH, "E:\\eclipse-SDK-3.1-win32\\eclipse\\workspace\\JR\\web\\WEB-INF\\lib\\jasperreports-1.1.1.jar" + System.getProperty("path.separator") + "E:\\eclipse-SDK-3.1-win32\\eclipse\\workspace\\JR\\web\\WEB-INF\\classes\\WEB-INF\\classes\\");
JRProperties.setProperty(JRProperties.COMPILER_TEMP_DIR, "E:\\eclipse-SDK-3.1-win32\\eclipse\\workspace\\JR\\web\\reports\\reports\\"); try { JasperCompileManager.compileReportToFile("E:\\eclipse-SDK-3.1-win32\\eclipse\\workspace\\JR\\web\\reports\\FirstReport.jrxml"); ret = true; } catch (JRException e) { response.setContentType("text\\html"); PrintWriter out = response.getWriter(); ......
}
|