Advanced Financial Reports - smartjsp

687 views
Skip to first unread message

Neil Gordon

unread,
Aug 21, 2014, 9:51:38 AM8/21/14
to idem...@googlegroups.com
I downloaded the source code for Advanced Financial Reports by Pedro Rozo (smartjsp) from here: https://bitbucket.org/anozimada/idempiere-smartreport/src.

It looks like it isn't updated for iDempiere-2.0, and I am experiencing some other issues with it.

I was wondering if anyone else is using it on iDempiere-2.0, and if so, did you do any modifications to get it to work?

See also: http://www.smartjsp.com/smartreport

-----
Neil Gordon
nTier Software Services
http://www.ntier.co.za

Anozi Mada

unread,
Aug 21, 2014, 12:31:06 PM8/21/14
to idem...@googlegroups.com
Can you tell me what kind of issues are you dealing with the current plugin? I'm sorry I haven't touch it again since the initial port to iDempiere.

Regards,
Anozi Mada

Neil Gordon

unread,
Aug 22, 2014, 3:40:12 AM8/22/14
to idem...@googlegroups.com
Anozi,

Thank you for your reply.

Here are the issues:
  • I received class not found exception on incorporating the plugin into my workspace:

WARNING: com.smj.process.SmjReport
java.lang.ClassNotFoundException: com.smj.process.SmjReport
    at org.eclipse.osgi.internal.loader.BundleLoader.findClassInternal(BundleLoader.java:513)
    at org.eclipse.osgi.internal.loader.BundleLoader.findClass(BundleLoader.java:429)
    at org.eclipse.osgi.internal.loader.BundleLoader.findClass(BundleLoader.java:417)
    at org.eclipse.osgi.internal.baseadaptor.DefaultClassLoader.loadClass(DefaultClassLoader.java:107)
    at java.lang.ClassLoader.loadClass(ClassLoader.java:247)
    at org.adempiere.base.DefaultProcessFactory.newProcessInstance(DefaultProcessFactory.java:64)
    at org.adempiere.base.Core.getProcess(Core.java:103)
    at org.adempiere.util.ProcessUtil.startJavaProcess(ProcessUtil.java:159)
    at org.compiere.apps.AbstractProcessCtl.startProcess(AbstractProcessCtl.java:466)
    at org.compiere.apps.AbstractProcessCtl.run(AbstractProcessCtl.java:234)
    at org.adempiere.webui.apps.WProcessCtl.process(WProcessCtl.java:158)
    at org.adempiere.webui.apps.ProcessModalDialog$ProcessDialogRunnable.doRun(ProcessModalDialog.java:506)
    at org.adempiere.util.ContextRunnable.run(ContextRunnable.java:38)
    at org.adempiere.webui.apps.DesktopRunnable.run(DesktopRunnable.java:40)
    at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:439)
    at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:303)
    at java.util.concurrent.FutureTask.run(FutureTask.java:138)
    at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.access$301(ScheduledThreadPoolExecutor.java:98)
    at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:206)
    at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:895)
    at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:918)
    at java.lang.Thread.run(Thread.java:662)
21 Aug 2014 11:56:58 AM org.compiere.model.GridTable dataRefreshAll

  • For testing, I incorporated the code into my base code.
  • Then, NPE on running financial report:

12:38:22.581-----------> zkoss.setFlex:122: The flex attribute is deprecated, use setHflex and setVflex on child component instead. [19]
12:38:22.995 Trx.commit: **** POSaveAD_Issue_70387499-1573-4b99-9880-a03b74a3ef8c [19]
12:38:22.609===========> SmjReport.process: java.lang.NullPointerException [19]
java.lang.NullPointerException
        at com.smj.process.SmjReport.doIt(SmjReport.java:341)^` at or
        at org.compiere.process.SvrProcess.process(SvrProcess.java:198)^`       at or
        at org.compiere.process.SvrProcess.startProcess(SvrProcess.java:144)^`  at or
        at org.adempiere.util.ProcessUtil.startJavaProcess(ProcessUtil.java:172)^`      at or
        at org.compiere.apps.AbstractProcessCtl.startProcess(AbstractProcessCtl.java:466)^`     at or
        at org.compiere.apps.AbstractProcessCtl.run(AbstractProcessCtl.java:234)^`      at or
        at org.adempiere.webui.apps.WProcessCtl.process(WProcessCtl.java:158)^` at or
        at org.adempiere.webui.apps.ProcessModalDialog$ProcessDialogRunnable.doRun(ProcessModalDialog.java:506)^`       at or
        at org.adempiere.util.ContextRunnable.run(ContextRunnable.java:38)^`    at or
        at org.adempiere.webui.apps.DesktopRunnable.run(DesktopRunnable.java:40)^`      at ja
        at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:439)^`    at ja
        at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:303)^` at ja
        at java.util.concurrent.FutureTask.run(FutureTask.java:138)^`   at ja
        at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.access$301(ScheduledThreadPoolExecutor.java:98)^`       at ja
        at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:206)^`     at ja
        at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:895)^`        at ja
        at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:918)^`    at ja
        at java.lang.Thread.run(Thread.java:662)^`^j^` add

  • I solved NPE by using AEnv.executeAsyncDesktopTask to run SessionManager.getAppDesktop().showWindow(viewer) in SmjReport.doIt()
  • A red box with an error appears on the screen after running the report, but there is no error in the log output. The report is then rendered.
  • Question: Is it possible to set Landscape orientation or is this done in the code?
  • The totals did not appear on the PDF.

-----
Neil Gordon
nTier Software Services
http://www.ntier.co.za


Neil Gordon

unread,
Jun 3, 2015, 6:59:27 AM6/3/15
to idem...@googlegroups.com
Hi Anozi,

We updated this plugin for release-2.0 of iDempiere.

Can we share the code back to your bitbucket repository?

Pedro Rozo

unread,
Jun 3, 2015, 12:45:20 PM6/3/15
to idem...@googlegroups.com
Hi eveyone, 

At smartjsp, we are glad to see that you guys improved this contribution, we are about to integrate it to our Idempeire 2.1 source with SmartPOS, SmartLoyalty and other open source projects, then could you send your enhanced version (.zip file) for testing to us (pedrorozo at smartjsp.com ) so we can test it, and then organize the newer repository.   ?

We have also received feedback & enhacements from Ecuador (Cybererp), then we will analyze both, integrate it,  including credits of the controibutors as well...

Regards

Pedro Rozo

Anozi Mada

unread,
Jun 3, 2015, 9:09:14 PM6/3/15
to idem...@googlegroups.com
If smartjsp will create the new official repository then it's better to create pull request there cause I can't really maintain it and I'm not that active anymore in iDempiere projects.

Pedro Rozo

unread,
Jun 3, 2015, 10:20:43 PM6/3/15
to idem...@googlegroups.com
Hi Anodi.

Thanks again for your contribution, having in ming that you are not planning to maintain this code in the future, could you confirm to us if  this version of your code the last one so we can test it  ?  https://bitbucket.org/anozimada/idempiere-smartreport   

Regards, 

Pedro Rozo.

Anozi Mada

unread,
Jun 3, 2015, 11:27:42 PM6/3/15
to idem...@googlegroups.com
No, I created it for iDempiere 1.0
I think Neil Gordon in the previous comment have updated it for iDempiere 2.0

Neil Gordon

unread,
Jun 4, 2015, 2:30:27 AM6/4/15
to idem...@googlegroups.com
Hi Pedro,

Thank you for the good work, and as importantly, the good documentation.

Anozi, thank you for the work you did converting it to iDempiere.

I've attached the .hg repository as a .zip and a .tar.gz.

Development is in branch release-2.0.

Search for NCG will show where modifications were done.

I have not updated or tested the 2pack for release-2.0.

Please let us know when you have created the new repository, and applied your updates. 

We look forward to your new work.

-----
Neil Gordon
nTier Software Services
http://www.ntier.co.za

idempiere-smartreport.tar.gz
idempiere-smartreport.zip

Alejandro Guerra

unread,
Jun 24, 2015, 9:08:42 PM6/24/15
to idem...@googlegroups.com
Hi Neil, 

Do you have some feedback about Advanced Financial Reports - smart jsp ?? It's Working  in idempiere 2.1. Can you give your advice!

Regards,

Neil Gordon

unread,
Jun 25, 2015, 10:27:56 AM6/25/15
to idem...@googlegroups.com
Hi Alejandro,

> Do you have some feedback about Advanced Financial Reports - smart jsp ?? It's Working  in idempiere 2.1. Can you give your advice!

From a developer's point of view, I think the code and documentation are good. I didn't update the 2 pack, so you may need to do the dictionary changes by hand.

The report renders in a PDF viewer, and even the default view (without making changes to the layout) is quite an improvement over the standard presentation. 

However, after I handed it over to our management to layout their reports, they experienced difficulties with it.

Pedro Rozo told me they were busy making changes and consolidating contributions, so maybe these difficulties will be resolved with the new release?

-----
Neil Gordon
nTier Software Services
http://www.ntier.co.za  


orlando....@dcsla.com

unread,
Jun 25, 2015, 10:37:02 AM6/25/15
to idem...@googlegroups.com
Hi, my five cents, i think that plugin is not necessary, the financial report have a Jasper Process Option, i have worked few days on this and this is so powerful.

 Please read the code about that.

  Regards.

orlando....@dcsla.com

unread,
Jun 25, 2015, 12:09:08 PM6/25/15
to idem...@googlegroups.com

 I give you some examples over here, 

   Regards.


El jueves, 21 de agosto de 2014, 8:51:38 (UTC-5), Neil Gordon escribió:
Balance de Comprobación.pdf

Pedro Rozo

unread,
Jun 25, 2015, 12:45:45 PM6/25/15
to idem...@googlegroups.com
Hi eveyone, this extension is for users of the finantial reports engine looking a bit of enhacements within the UI  .. that means people that want to keep this flexible parametric report  engine not the jasper approach........ we are a bit busy testing some of the previous contributions and with other releases, so we hope to have a newer version for Idempiere 2.1 between two-three months window.

For people that want to have full control of the report you will have always jasper, but you will have to pay the price of that control (dependecy of the developer for the end user, while the report engine is made for the autonomous end user) then you have two options to choose, Orlando is talking about regular jasper reports .... our extension is about the engine ....

Regards.

Pedro Rozo.

Carlos Antonio Ruiz Gomez

unread,
Jun 25, 2015, 1:10:41 PM6/25/15
to idem...@googlegroups.com
Just another 2 ¢ here trying to clarify some concepts:

The financial reports can usually be configured and parameterized in the Financial Reports window (and that's a highly recommended approach instead of writing your own)

And then the output of those financial reports can be formatted (just formatted, not parameterized) using jasper.
I think that's what Orlando is showing in the sample -> not jasper written financial reports, but financial report configured, and jasper formatted.

As I understand (I haven't tested) the approach from Pedro extends the Financial Report configuration to add some formatting.

I guess both approaches have advantages and disadvantages, is a matter of anyone to choose which one to use.


BTW - I think the only needed to complete Anozi's integration work and make it fully useful is the 2pack - somebody from the community could contribute that piece, the big work was already done by SmartJSP.
The work is just to create the dictionary elements described on this guide:
http://smartjsp.com/smartreport/FinancialReportInstallation.pdf
And create a 2pack with those elements.
Anybody?


Regards,

Carlos Ruiz

Alejandro Guerra

unread,
Jun 25, 2015, 1:12:32 PM6/25/15
to idem...@googlegroups.com
Orlando, Can you share your example ??

Regards,

orlando....@dcsla.com

unread,
Jun 25, 2015, 1:24:33 PM6/25/15
to idem...@googlegroups.com
I share the Jasper created by Angel Parra, Alejandro could collaborate with the community doing the 2pack mentioned by Carlos? regards :-)

DCS_BalanceComprobacion.jrxml

Freddy Heredia

unread,
Jun 25, 2015, 2:10:43 PM6/25/15
to idem...@googlegroups.com
Greetings to all,

A time of ignorance of the existence of the repository anozimada ago, also migrated plugin Pedro Rozo SmartReport a plugin, it is public in the repository:


Greetings.

--
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+...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/idempiere/4e816d3d-0d39-444f-bafe-c0e3608afc6f%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Neil Gordon

unread,
Jun 26, 2015, 3:41:38 AM6/26/15
to idem...@googlegroups.com, freddy....@ingeint.ec
> A time of ignorance of the existence of the repository anozimada ago, also migrated plugin Pedro Rozo SmartReport a plugin, it is public in the repository:

Is it for iDempiere 2.1?

I see there is a 2pack as well... has it been updated as well?

Neil

Freddy Heredia

unread,
Jun 26, 2015, 9:34:13 AM6/26/15
to idem...@googlegroups.com
yes, the 2Pack and the code is migrated to version 2.1

Alejandro Guerra

unread,
Jun 26, 2015, 9:44:02 AM6/26/15
to idem...@googlegroups.com, freddy....@ingeint.ec
Wao !!! Freddy good job and excelente 5 ¢ contribution

Pedro Rozo

unread,
Aug 10, 2015, 4:42:12 PM8/10/15
to iDempiere, freddy....@ingeint.ec
Hi Everyone, 

Other projects captured our development prioritites for a while and just until now we are testing Freddy´s contribution to our previous SmartReport version (we have analyzed other migrations from Ecuador & other teams and this one looks the more complete and well written with the packout file) , great work Freddy, and thanks for sharing.


From our preliminary testing, so far the basic functionality is working, we just found  two issues that I report here before spending too much time debugging .... perhaps some of you can replicate them or let us know possibles solutions/workarounds:

1. Idempiere 2.1 on Windows.   (Postgres 9.2)

    - Packin flawlessly
    - Rendering of the HTML & PDF works, we have compared 3 finantial reports generared before with the Adempeire version and they match numbers & look &f eel.
    ->>>>>  we are getting this severe error after the HTML or PDF rendering:  

                SEVERE: startFinReport - No PrintFormat

2. Idempiere 2.1 on Linux 64 (Postgres 9.2)
    Using the same db backup, postrgres & idempeire versions
    Idempiere can not import the current 2pack.zip.  Enclosed the java stack.   
   We saw some db errors because the AD reference already exists from the previous release (migrated environmente), but with the same DB, idempiere 2.1 on windows the packin works, while in linux it fails ....  

Any thoughts  ? suggestions ..   Your feedback is welcome ..

Regards,

Pedro R. 
trace.txt

Carlos Antonio Ruiz Gomez

unread,
Aug 11, 2015, 8:06:12 PM8/11/15
to idem...@googlegroups.com
Pedro, I just tested importing the 2Pack from Freddy in a daily 2.1 and everything imported fine.

Usually the error in the trace is caused because you have the same AD_Ref_List.Value with a different UUID

Regards,

Carlos Ruiz
Reply all
Reply to author
Forward
0 new messages