2006 IR Open Dicussion Posted September 5, 2006 Share Posted September 5, 2006 By: learner - shanig Compiling .jrxml from swing application 2006-04-04 12:44 Hello There, I'm using IReport Designer and Jasper Reports for Reporting in my swing application. I have made a Stock report which is a very simple report showing the current values of Stock table without taking any argument. I generated this report using IReport 1.2 and is running fine and giving me required output. Now when I want to call StockReport.jrxml from my swing application it is throwing exception. Following is the code i'm writting on the click of a button try{ JasperDesign jasperDesign = JRXmlLoader.load("D:/Eclipse Work/fitup/Reports/StockReport.jrxml"); JasperReport jasperReport = JasperCompileManager.compileReport(jasperDesign); IConnection con=new ConnectionManager(); JasperPrint jasperPrint = JasperFillManager.fillReport(jasperReport, null, con.open()); JasperViewer.viewReport(jasperPrint); }catch(Exception ex) { // String connectMsg = "Could not create the report " + ex.getMessage() + " " + ex.getLocalizedMessage(); System.out.println(ex); } and Following is the message I'm getting at runtime net.sf.jasperreports.engine.JRException: Error compiling report java source files : D:Eclipse WorkfitupStockReport_1144174836523_631297.java As i'm developing my application using Eclipse 3.1 so i have also added following five external jars in my application jasperreports-1.2.0.jar, commons-beanutils-1.5.jar, commons-collections-2.1.jar, commons-digester-1.7.jar, commons-logging-1.0.2.jar. I would really appreciate if you will help me as I have never worked in Jasper Reports before. Regards learner By: cardondenis - cardondenis RE: Compiling .jrxml from swing application 2006-04-08 08:36 Hi, have you tried to compile the D:Eclipse WorkfitupStockReport_1144174836523_631297.java file within your eclipse environement? Does it compile? Have you taken a look at that java file? Does it look ok? Do you have a full stack trace of the exception? Are you sure you do not miss some libs (there are many other in the iReport distrib). Cheers, Denis Link to comment Share on other sites More sharing options...
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now