}
try {
String datasourceName = delegator.getEntityHelperName(info);
Report report = new Report();
report.setDatabaseConnection(ConnectionFactory.getConnection(datasourceName));
/* NOTE: this is the old code that is no londer needed because of the new setDatabaseConnection method
report.setDatabasePassword(""); // password can be bogus because we are using an OFBiz connection...
Debug.logInfo("before creating database", module);
DataVisionDatabase dvDb = new DataVisionDatabase(datasourceName, report);
report.setDatabase(dvDb);
*/
Debug.logInfo("before reading file", module);
report.read(new File(context.getRealPath(page))); // Must be after password
/* NO support for param file yet... need to pull in page params or something
if (there_are_params_in_report) {
// This must come after reading the report file
report.setParameterXMLFile(param_xml_file_name);
} */
Debug.logInfo("before set layout engine", module);
report.setLayoutEngine(new jimm.datavision.layout.HTMLLE(response.getWriter()));
Debug.logInfo("before run report", module);
report.runReport(); // Run the report in this thread
Debug.logInfo("after run report, end", module);
} catch (UserCancellationException e) {
throw new ViewHandlerException("User cancelled report", e);
} catch (FileNotFoundException e) {
throw new ViewHandlerException("Report file not found [" + page + "]", e);