Idempiere class modification ReportStarter

148 views
Skip to first unread message

Fabio Canella

unread,
Oct 17, 2016, 3:58:47 AM10/17/16
to iDempiere
Hello, in adempiere I made a modified ReportStarter class (and others like JRViewerProvider), to connect to jasperserver and show reports calling it from adempiere.
There are several classes that I had modified because JasperServer return a pdf object instead of a JasperPrint object (and this made adempiere independent from jasper library version), I made a customization.jar package in the adempiere way for this functionality.

Now I would like to develop the same functionality in iDempiere, can you suggest me please, how can I do this in OSGI way ?

In general, i think It would be interesting to have a "print" functionality that call an external rest web service (passing the parameters) and show the result (pdf or html) inside iDempiere.


Best regards

Fabio
Effecitech

Hiep Lq

unread,
Oct 17, 2016, 4:36:37 AM10/17/16
to Mohemmed Bilal Ilyas
it's great to separate report engine, not sure it match with your requirement, but worthy to check.

--
You received this message because you are subscribed to the Google Groups "iDempiere" group.
To unsubscribe from this group and stop receiving emails from it, send an email to idempiere+unsubscribe@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/idempiere/025d95fd-53ea-4d1a-b512-70184f415e1c%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.



--
Lê Quý Hiệp
Email: hie...@hasuvimex.vn
Skype: admin.hasuvimex

Company: Thanh Hoa Fishery Import - Export J.s.c  (HasuvimexDL 47
Add: Lot E, Le Mon Industrial Zone, Thanh Hoa, Vietnam

Carlos Antonio Ruiz Gomez

unread,
Oct 17, 2016, 4:48:02 AM10/17/16
to idem...@googlegroups.com
I think better you can check:
https://idempiere.atlassian.net/browse/IDEMPIERE-2684

You can follow the comments and give us feedback if the patch works and is required - or if the workaround mentioned can work.

Regards,

Carlos Ruiz


El 17/10/16 a las 10:36, 'Hiep Lq' via iDempiere escribió:
it's great to separate report engine, not sure it match with your requirement, but worthy to check.

On Mon, Oct 17, 2016 at 2:58 PM, Fabio Canella <canell...@gmail.com> wrote:
Hello, in adempiere I made a modified ReportStarter class (and others like JRViewerProvider), to connect to jasperserver and show reports calling it from adempiere.
There are several classes that I had modified because JasperServer return a pdf object instead of a JasperPrint object (and this made adempiere independent from jasper library version), I made a customization.jar package in the adempiere way for this functionality.

Now I would like to develop the same functionality in iDempiere, can you suggest me please, how can I do this in OSGI way ?

In general, i think It would be interesting to have a "print" functionality that call an external rest web service (passing the parameters) and show the result (pdf or html) inside iDempiere.


Best regards

Fabio
Effecitech


--

Fabio Canella

unread,
Dec 1, 2016, 2:39:27 AM12/1/16
to iDempiere
Thanks, I tried to implement my own ProcessFactory and the workaround run correctly.

Now I have to visualize the pdf... I'm tring to call a my own JRViewerProvider implementation (I need a method with pdf file as parameter instead of jasperprint)

I see that the JRViewerProvider is located with this:
JRViewerProvider viewerLauncher = Service.locator().locate(JRViewerProvider.class).getService();

Best regards
Fabio

Fabio Canella

unread,
Mar 23, 2017, 1:44:09 PM3/23/17
to iDempiere
Finally I solved the problem to visualize the pdf from process, creating a my own PDFViewer Window and calling it using the following code (that I found in the forum):
 

Runnable runnable = new Runnable() {

@Override

    public void run() {

    Window viewer = new PdfViewer(fileName, “ReportName”);

    

    viewer.setAttribute(Window.MODE_KEY, Window.MODE_EMBEDDED);

    viewer.setAttribute(Window.INSERT_POSITION_KEY, Window.INSERT_NEXT);

    viewer.setAttribute(WindowContainer.DEFER_SET_SELECTED_TAB, Boolean.TRUE);

    SessionManager.getAppDesktop().showWindow(viewer);

    }

   };

   AEnv.executeAsyncDesktopTask(runnable);



Best regards
Fabio

Reply all
Reply to author
Forward
0 new messages