Repeat previews jasper reports

40 views
Skip to first unread message

Andrea Checchia

unread,
Mar 13, 2017, 10:53:11 AM3/13/17
to iDempiere
Hello everyone.

I'm trying to create a process that allows me to open N previews jasper reports based on the selected record in a window.

Use this:

//HengSin - to let process end with message and requery
 
WProcessCtl.process(p_WindowNo, m_pi, (Trx)null, new EventListener<Event>() {
 
   
@Override
   
public void onEvent(Event event) throws Exception {
       
ProcessModalDialog processModalDialog = (ProcessModalDialog)event.getTarget();
       
if (DialogEvents.ON_BEFORE_RUN_PROCESS.equals(event.getName())){
          updateListSelected
();
         
// store in T_Selection table selected rows for Execute Process that retrieves from T_Selection in code.
         DB
.createT_SelectionNew(pInstanceID, getSaveKeys(getInfoColumnIDFromProcess(processModalDialog.getAD_Process_ID())),
         
null);
     
}else if (ProcessModalDialog.ON_WINDOW_CLOSE.equals(event.getName())){
         
if (processModalDialog.isCancel()){
         
// enable or disable control button rely selected record status
          enableButtons
();
     
}else if (m_pi.isError()){
         
ProcessInfoDialog.showProcessInfo(m_pi, p_WindowNo, InfoGenForJasperReport.this, true);
         
// enable or disable control button rely selected record status
          enableButtons
();
     
}else if (!m_pi.isError()){
         
ProcessInfoDialog.showProcessInfo(m_pi, p_WindowNo, InfoGenForJasperReport.this, true);
          isRequeryByRunSuccessProcess
= true;
         
Clients.response(new AuEcho(InfoGenForJasperReport.this, "onQueryCallback", null));
     
}
   
}
 
   
//HengSin -- end --
 
}
 
});


the loop based on the selected records; the problem is that I need the autostart of jasper process without the ProcessModalDialog.
Can you please give me some idea about?

thanks in advance.

Andrew
Reply all
Reply to author
Forward
0 new messages