Hi, is there a simple way in Servoy where the user can stop or cancel the plugins.jasperPluginRMI.runReport process? The user might be printing hundreds or thousands of records, and he might want to cancel the transaction in between the process.
If this is not possible, can a client customized plugin call the Servoy jasper plugin? I was thinking I could call a customized client plugin which may spawn a new thread and call the printing method of jasper plugin, which will make the call to print asynchronous, and then when user clicks on cancel printing, the customized client plugin kills the printing thread to stop the process. Is there a better way to do this?
Any input is highly appreciated.
You would have to dig into the JasperReports lib to know if a print can be stop when it’s started. Not sure about that.
If it can, then yes, you could have a client plugin, creating a thread communicating with a server plugin which would expose a cancel method.
You might also want to have a look at Jasper Server. They have extended REST api that might do what you need here.
Hope this helps,
ptalbot:
You would have to dig into the JasperReports lib to know if a print can be stop when it’s started. Not sure about that.
If it can, then yes, you could have a client plugin, creating a thread communicating with a server plugin which would expose a cancel method.You might also want to have a look at Jasper Server. They have extended REST api that might do what you need here.
Hope this helps,
Thanks for the reply.
The application thread just stops when calling JasperFillManager.fillReport, which I think is because of the synchronous call to JasperFillManager.fillReport.
I found solutions using AsynchronousFillHandle class for JasperReport 4.5.0, but I am currently using Servoy Basic_Servoy_JasperReports_Plugin_v.3.3.0_b1, which uses JasperReport 4.0.0 only. Is this the latest Servoy Jasper plug-in version?
I am still looking for a solution for JasperReport 4.0.0. If I didn’t get any, I might just get the AsynchronousFillHandle codes from 4.5.0 and try it in 4.0.0.