modify core to handle print button of infoWindow from plugin
Description
Environment
Attachments
Activity
Heng Sin Low July 16, 2021 at 6:42 AM
Closing this after inactivity of > 2 year. Please reopen if you intent to work further on this.
Carlos Ruiz September 11, 2018 at 12:49 PM
,
What I suggest is the common way for a process/report to communicate with user via parameters - and then call a java process to do something with the parameters.
Hiep Lq September 11, 2018 at 12:34 PM
thanks Mr I will rethinking about your suggest.
(or if something is not implemented to work with jasper reports maybe that's a bug)
current it call jasper report just fine as common.
but still not sure about "Doing pre-process before a jasper report is actually possible"
because pre-process should at GUI level for easy communicate with user.
maybe i open the door at handle "DialogEvents.ON_BEFORE_RUN_PROCESS" on function InfoPanel.runProcess
Carlos Ruiz September 11, 2018 at 10:53 AM
> other side it take logic to handle print function out of core, let implement freedom,
> and don't make class infopanel become complicate more.
This is kind of what makes me feel about this is not the best implementation, is adding a lot of complexity instead of just using what is already in core that actually works.
I don't see infopanel becoming more complex, what I see is that InfoPanel can work just as it is (or if something is not implemented to work with jasper reports maybe that's a bug).
So, if we add this then we'll have a way to pass records to process via t_selection, and a different way to pass records to a jasper report via an array parameter - IMHO that just add more complexity, and doesn't add too much to something that is working fine.
Samely, we already have configurable buttons, very nicely implemented you can make it separated buttons, list buttons, or a list + a process button - or even a combination. But instead of sticking to that approach we're now adding a new button that is configurable in a totally different way.
Doing pre-process before a jasper report is actually possible, I think is just to write the class that preprocess the jasper.
Hiep Lq September 11, 2018 at 10:15 AM
1. default print button is invisible, logic to visible it lie at plugin. print i mean export also.
standard i mean: when implement a system, end-user want print info window, they will want it on every info window, at same place.
2. process button working fine. it have standard flow
onclick -> call process -> show dialog (option) -> save selecttion id to t_selection table -> save parameter to database -> run process
but for print i want add do some thing before "run process" so i will hand event on DialogEvents.ON_BEFORE_RUN_PROCESS
multi process button is ok, but sometime i want to dynamic choose jasper report up to selected record, so end-user don't need to remember print logic.
for print all, it's cheaper when you pass only array of key.
Example info window has multi page, but user just open page 1 and want to print all,
code have to load all page to get key and save to t_selection or change logic of get that key and save to t_selection
other side it take logic to handle print function out of core, let implement freedom, and don't make class infopanel become complicate more.
I saw some guys on group, and my friend from Thailand have requirement about print button on info window.
so i create this ticket to open a door to implement jasper report print from info window
it add two service:
1. IInfoButtonSetting will get MInfoPanel to decide invisible or visible print button
2. IInfoPrintHandle will handle event when user click to print button
i also provide plugin implement it by me.