marco159 Posted May 25, 2010 Share Posted May 25, 2010 Hi,I'd like to know if there's a way (java code) to check compatibility of a .jrxml or .jasper report created with iReport and the JasperReport engine.Since the iReport and JasperReport versions change frequently, I can't upgrade my installations everytime.Users download the latest iReport version, upload the report to my application (running a previous version of jasperreport) and then some unexpected errors occur.Is there a way to get the iReport version used to create a jrxml or jasper file?I found this way to read the JasperReport version:net.sf.jasperreports.engine.JasperCompileManager.getClass().getPackage().getImplementationVersion();but I can't get the iReport version used for a jrxml or jasper file.By simply comparing the two values I could warn the user that the iReport version used is not right.Thanks,Marco Link to comment Share on other sites More sharing options...
keithrbennett Posted June 11, 2010 Share Posted June 11, 2010 Marco -I'm just a newbie, but I looked in my .jrxml file produced by iReport and didn't see any XML elements identifying the iReport version, or even that it had been produced by iReport at all.I think it's reasonable for Jasper Reports not to care whether or not its configuration file was produced by any particular tool, but I agree that it would be helpful for it to know and check. This could be cumbersome to implement though, and of course it would not know about any versions created after itself.Maybe even more useful would be to check the content of the XML itself to see if there were any (perceived) errors; then it would catch errors regardless of the way in which the file was created. Could this be done merely by attempting to load the .jrxml file, or there errors that that does not catch?- Keith Link to comment Share on other sites More sharing options...
marco159 Posted August 5, 2010 Author Share Posted August 5, 2010 Unfortunately, most of the times the errors appear when filling the report (not when compiling the jrxml). 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