I am using jasper report scriptlet --> beforeReportInit() and I want to call a Stored Procedure in oracle database so that a temporary table will be populated with data which i can then use to fill the report.
In other words I'm trying to achieve some oracle reports after parameter form trigger actions. How can I do this or what am i missing here?
/* before report is initialized */
public void beforeReportInit() throws JRScriptletException {
// gathering report connection
Connection conn = (Connection) this
.getParameterValue("REPORT_CONNECTION");
// calling stored procedure execution method.
boolean status = executeStoredProcedures(conn,
this.getParameterValue("P_NIC").toString(),
Integer.valueOf(this.getParameterValue("P_TYPE").toString()));
// if fails
if (!status) {
// setting the error on variable to display on the report
this.setVariableValue("ERROR_LOG", "PRE-REPORT TRIGGER FAILURE");
}
}
Thanks in advance!.