Is there a way to connect JasperReport and JBuilder data module
JDataStore database connection ?
My JasperReport/JDataStore connection code now looks like this >
try {
String FILE =
"/home/brunetdj/my/source/jbuilder/info2006/rpt/pregled.jrxml";
JasperPrint jasperPrint = new JasperPrint();
Map inputParameters = new HashMap();
Connection rpt_db = null;
try {
Class.forName("com.borland.datastore.jdbc.DataStoreDriver");
} catch (ClassNotFoundException ex) {
}
try {
rpt_db =
DriverManager.getConnection("jdbc:borland:dslocal:/home/brunetdj/my/source/jbuilder/info2006/data/podaci.jds",
"SYSDBA",
"masterkey");
} catch (SQLException ex1) {
}
inputParameters.put("sometitle","first report");
JasperReport jasper_report =
JasperCompileManager.compileReport(FILE);
JasperPrint printed_report =
JasperFillManager.fillReport(jasper_report,
inputParameters, rpt_db);
JasperViewer.viewReport(printed_report,false);
}
catch (JRException excecao) {
System.out.println("Error: " + excecao.getMessage());
}
Please, help, if any can ...
P.S. Point is to put in rpt_db my JBuilder data module connection.