hi,
I created jasper reports using ireport 3.0.0.
Now I wanted to run the report from a java class, I was able to do that from a standalone java program, but when I tried to run the reports using the same code through jbdeveloper studio version 1.0.0.GA, then I got the following error:
Could not create the report net.sf.jasperreports.engine.JRRuntimeException: net.sf.jasperreports.engine.JRException: Class "net.sf.jasperreports.engine.query.JRJdbcQueryExecuterFactory" should be compatible with "net.sf.jasperreports.engine.query.JRQueryExecuterFactory" net.sf.jasperreports.engine.JRRuntimeException: net.sf.jasperreports.engine.JRException: Class "net.sf.jasperreports.engine.query.JRJdbcQueryExecuterFactory" should be compatible with "net.sf.jasperreports.engine.query.JRQueryExecuterFactory"
the code main code I am using to run the report is as below:
public static final String DRIVER = "com.mysql.jdbc.Driver";
public static final String URL = "jdbc:mysql://localhost/database?user=user&password=password";
JasperDesign jasperDesign = JRXmlLoader.load("..\\..\\Report.jrxml");
JasperReport jasperReport = JasperCompileManager.compileReport(jasperDesign);
Class.forName(DRIVER );
Connection connection = (Connection)DriverManager.getConnection(URL);
JasperPrint jasperPrint = JasperFillManager.fillReport(jasperReport, null, connection);
JasperViewer.viewReport(jasperPrint);
please suggest.