IDEMPIERE-214 - Schedular does not work with Jasper reports
(transplanted from f99f4696caa2faf52654c81630c7a7aac7fca3f3)
This commit is contained in:
parent
bb8239152c
commit
f7cf69bc60
|
@ -219,20 +219,22 @@ public class Scheduler extends AdempiereServer
|
||||||
File report = null;
|
File report = null;
|
||||||
if (isReport) {
|
if (isReport) {
|
||||||
// Report
|
// Report
|
||||||
if(process.getJasperReport() != null)
|
ReportEngine re = ReportEngine.get(m_schedulerctx, pi);
|
||||||
|
|
||||||
|
if(process.getJasperReport() != null
|
||||||
|
|| (re != null && re.getPrintFormat().getJasperProcess_ID() > 0))
|
||||||
{
|
{
|
||||||
|
// We have a Jasper Print Format
|
||||||
|
// ==============================
|
||||||
ProcessInfo jasperpi = new ProcessInfo ("", process.getAD_Process_ID());
|
ProcessInfo jasperpi = new ProcessInfo ("", process.getAD_Process_ID());
|
||||||
jasperpi.setIsBatch(true);
|
jasperpi.setIsBatch(true);
|
||||||
ServerProcessCtl.process(null, jasperpi, null);
|
ServerProcessCtl.process(null, jasperpi, null);
|
||||||
report = jasperpi.getPDFReport();
|
report = jasperpi.getPDFReport();
|
||||||
}
|
}
|
||||||
// Standard Print Format (Non-Jasper)
|
|
||||||
// ==================================
|
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
// We have a Jasper Print Format
|
// Standard Print Format (Non-Jasper)
|
||||||
// ==============================
|
// ==================================
|
||||||
ReportEngine re = ReportEngine.get(m_schedulerctx, pi);
|
|
||||||
if (re == null)
|
if (re == null)
|
||||||
return "Cannot create Report AD_Process_ID=" + process.getAD_Process_ID()
|
return "Cannot create Report AD_Process_ID=" + process.getAD_Process_ID()
|
||||||
+ " - " + process.getName();
|
+ " - " + process.getName();
|
||||||
|
|
Loading…
Reference in New Issue