-
FEATURED COMPONENTS
First time here? Check out the FAQ!
Hi all i have problems to run my first JasperReport under ZK.
ErrorMessage: HTTP Status 410 - Failed to load /view/z_gxo/vY2Qb/4mh/0/C:/Users/15997017/Desktop/sts-bundle/pivotal-tc-server-developer-3.html Cause: No query executer factory registered for the 'plsql' language.
My source code: reportPO.java:
public class reportPO extends GenericForwardComposer<component>{ Window winReportes; Jasperreport report; Iframe frame; String reportSrc,jrxmlSrc,folder; Map parameters = new HashMap(); AMedia am,bm; Connection conn;
private Label lblPar1;
private Label lblPar2;
private Label lblPar3;
private Label lblPar4;
private Label lblPar5;
@SuppressWarnings("unchecked")
@Override
public void doAfterCompose(Component comp) throws Exception {
super.doAfterCompose(comp);
String pbranchid=Executions.getCurrent().getParameter("branchid");
String pjob=Executions.getCurrent().getParameter("job");
String psdate=Executions.getCurrent().getParameter("start");
String pedate=Executions.getCurrent().getParameter("end");
String ptipe=Executions.getCurrent().getParameter("tipe");
String ptype=Executions.getCurrent().getParameter("type");
lblPar1.setValue(pbranchid);
lblPar2.setValue(pjob);
lblPar3.setValue(psdate);
lblPar4.setValue(pedate);
lblPar5.setValue(ptipe);
conn= OracleConnUtils.getOracleConnection();
folder= Sessions.getCurrent().getWebApp().getRealPath("/WEB-INF/");
reportSrc = Sessions.getCurrent().getWebApp().getRealPath("/jasper/reportPO.jasper");
parameters.put("BRANCHID", pbranchid);
parameters.put("JOB", pjob);
parameters.put("STARTDATE", psdate);
parameters.put("ENDDATE", pedate);
parameters.put("TIPE", ptipe);
report.setParameters(parameters);
report.setDataConnection(conn);
report.setType(ptype);
report.setSrc(reportSrc);
}
}
OracleConnUtils.java:
public class OracleConnUtils {
public static Connection getOracleConnection() throws ClassNotFoundException, SQLException {
String hostName = "22.12.10.222";
String sid = "lol";
String userName = "jaja";
String password = "miracle";
return getOracleConnection(hostName, sid, userName, password);
}
public static Connection getOracleConnection(String hostName, String sid, String userName, String password)
throws ClassNotFoundException, SQLException {
Class.forName("oracle.jdbc.driver.OracleDriver");
String connectionURL = "jdbc:oracle:thin:@" + hostName + ":1521:" + sid;
Connection conn = DriverManager.getConnection(connectionURL, userName, password);
return conn;
}
}
any ideas are welcome
Asked: 2016-10-10 11:24:52 +0800
Seen: 18 times
Last updated: Oct 10 '16