Integrate Pentaho Report with OpenERP

Asked by stone.wu

Hi all,

I'm trying to integrate Pentaho-PRD (Pentaho Report Designer) with OpenERP
I saw a discussion on OpenERP's forum http://www.openerp.com/forum/topic33277.html
they're using addons from WillowIT to do integration

What i'm doing is :
1. Goto https://github.com/WillowIT/Pentaho-reports-for-OpenERP and download the addons
2. Install the addons on my OpenERP 6.1
3. Then download Pentaho PRD version 3.8.0-GA.13698
4. For OpenERP datasource on PRD, i'm following steps from http://pvandermpentaho.blogspot.com/2012/05/adding-openerp-datasource-to-pentaho.html?showComment=1340789043473#c7720586171730071212

The steps that we need to do for adding the OpenERP datasource to PRD 3.8 are :

Step 1: Download Required Packages

DOWNLOAD THE JAR FILES FOR THE FOLLOWING COMPONENTS:

PRD OpenERP data source.
PRD OpenERP data source editor.
OpenERP Java Report Helper (v0.10.0-Beta).
OpenERP Java Api (v1.0.0).

DOWNLOAD THE XMLRPC BINARY LIBRARIES FROM APACHE (USUALLY IN A ZIP/TAR):

Apache XMLRPC libraries (v3.1.3).

Step 2: Copy contents to lib folder

Copy the jar files previously downloaded and place it in the 'lib' directory of your PRD installation.
Extract the contents of the XMLRPC zip to a temporary folder. Copy xmlrpc-client-3.1.3.jar, xmlrpc-common-3.1.3.jar and ws-commons-util-1.0.2.jar from the extracted 'lib' folder into the PRD installation 'lib' folder.

Step 3 : Start Developing

Done. Simply start PRD as normal and start using the new data source. The data source is located in the 'Advanced' submenu when adding a data source.

I'm stuck on step 3, i opened my PRD then create a new report,
on Data Sets i choose Advanced option and there're no OpenERP datasource to choose....

Anybody got the same problem with me?
The detail steps provided will be much appreciated.

Thx
Stone

Question information

Language:
English Edit question
Status:
Solved
For:
Odoo Server (MOVED TO GITHUB) Edit question
Assignee:
No assignee Edit question
Solved by:
stone.wu
Solved:
Last query:
Last reply:
Revision history for this message
stone.wu (sutono-wu) said :
#1

to answer my own question...

Available source link location for OpenERP data source in PRD are :
* <a href="http://repository.pentaho.org/artifactory/pentaho/pentaho-reporting-engine/pentaho-reporting-engine-classic-extensions-openerp/3.8-SNAPSHOT/pentaho-reporting-engine-classic-extensions-openerp-3.8-SNAPSHOT.jar">PRD OpenERP data source.</a>
* <a href="http://repository.pentaho.org/artifactory/pentaho/pentaho-reporting-engine/pentaho-reporting-engine-datasource-editor-openerp/3.8-SNAPSHOT/pentaho-reporting-engine-datasource-editor-openerp-3.8-SNAPSHOT.jar">PRD OpenERP data source editor.</a>

and 1 more important information is : we HAVE TO use PRD version 3.9 GA above to support OpenERP data source.
you can download the PRD at :
http://sourceforge.net/projects/jfreereport/files/latest/download?source=files

Revision history for this message
Gestion-Ressources (mareeting) said :
#2

Hello ,

I created my report in PRD (Pentaho Report Designer 3.9.1-GA.16112).

I have 2 parameters : country_param and state_param that I added to my query.

When I run my report, It works fine .I select the first param (it'is a country drop-down list) which shows all countries.

The second parameter depends on the first. It shows all states.

For example, if I select Canada for the first parameter, the second shows all states in Canada exlcusively.

When I add my report in OpenErp, I get the same wizard : I reproduced the same example, but the state drop-down list dosen't work; it seems that the value chosen in the first drop-down list does not impact the second ; It show empty list.

Someone can help me to resolve this issue.

Revision history for this message
James Monod (james-monod) said :
#3

Hello,

Wolud you please provide steps from installations to create report in pentaho.

./report-designer.sh: 15: ./report-designer.sh: /usr/lib/jvm/java-7-openjdk/bin/java: not found

I always go this error when going to run petaho desinger.

Thanks

Revision history for this message
El Hadji Dem (http://www.savoirfairelinux.com) (eh-dem) said :
#4

what pentaho version did you install ???

Revision history for this message
James Monod (james-monod) said :
#5

hello eh.dem,

I do not know how to check version :(.

Thanks for your help.

Revision history for this message
El Hadji Dem (http://www.savoirfairelinux.com) (eh-dem) said :
#6

Hello James, to check the version :

1- Run Pentaho Report Designer (PRD)

2- Go to Help -> About menu to show the version.

I you want to know How to Create Report with Pentaho Report Designer, you can check this link : http://www.youtube.com/watch?v=mkXWFa41VRw

Revision history for this message
James Monod (james-monod) said :
#7

hello eh.dem

when i run Run Pentaho Report Designer (PRD) i got the error

./report-designer.sh: 15: ./report-designer.sh: /usr/lib/jvm/java-7-openjdk/bin/java: not found

thanks

Revision history for this message
James Monod (james-monod) said :
#8

here is my error

DEBUG: Using JAVA_HOME
DEBUG: _PENTAHO_JAVA_HOME=/usr/lib/jvm/java-7-openjdk
DEBUG: _PENTAHO_JAVA=/usr/lib/jvm/java-7-openjdk/bin/java
./report-designer.sh: 15: ./report-designer.sh: /usr/lib/jvm/java-7-openjdk/bin/java: not found

Revision history for this message
El Hadji Dem (http://www.savoirfairelinux.com) (eh-dem) said :
#9

Hello James, I propose you to install the java sun :

This is my config below :

DEBUG: Using JAVA_HOME
DEBUG: _PENTAHO_JAVA_HOME=/usr/lib/jvm/java-6-sun/jre
DEBUG: _PENTAHO_JAVA=/usr/lib/jvm/java-6-sun/jre/bin/jav

Revision history for this message
James Monod (james-monod) said :
#10

Hello eh.dem,

Thanks for your valuable effort for helping me.

I solve the above error again thanks for your help.

Now I got another error,

I start prd make a report and saved the report as invoice.prpt

Whne i make action of this report and goint to print report from openerp. I face the below error

Is anythng else i missing?

Traceback (most recent call last):
  File "/home/monod/openerp/7/server/openerp/service/web_services.py", line 712, in go
    (result, format) = obj.create(cr, uid, ids, datas, context)
  File "/home/monod/openerp/7/addons/pentaho_reports/core.py", line 160, in create
    return report_instance.execute()
  File "/home/monod/openerp/7/addons/pentaho_reports/core.py", line 99, in execute
    return self.execute_report()
  File "/home/monod/openerp/7/addons/pentaho_reports/core.py", line 120, in execute_report
    proxy_parameter_info = proxy.report.getParameterInfo(proxy_argument)
  File "/usr/lib/python2.7/xmlrpclib.py", line 1224, in __call__
    return self.__send(self.__name, args)
  File "/usr/lib/python2.7/xmlrpclib.py", line 1578, in __request
    verbose=self.__verbose
  File "/usr/lib/python2.7/xmlrpclib.py", line 1264, in request
    return self.single_request(host, handler, request_body, verbose)
  File "/usr/lib/python2.7/xmlrpclib.py", line 1312, in single_request
    response.msg,
ProtocolError: <ProtocolError for localhost:8080/pentaho-reports-for-openerp: 404 Not Found>

Revision history for this message
El Hadji Dem (http://www.savoirfairelinux.com) (eh-dem) said :
#11

Hello James,

I suppose you have already install the tomcat.

Follow this instructions on https://github.com/WillowIT/Pentaho-reports-for-OpenERP.

Revision history for this message
El Hadji Dem (http://www.savoirfairelinux.com) (eh-dem) said :
#12

Let me know

Revision history for this message
James Monod (james-monod) said :
#13

Hello eh.dem

Again many many thanks for your valuable reply and time

I followed the your given url instruction , now I stuck in another problem'

Traceback (most recent call last):
  File "/home/monod/openerp/7/server/openerp/service/web_services.py", line 712, in go
    (result, format) = obj.create(cr, uid, ids, datas, context)
  File "/home/monod/openerp/7/addons/pentaho_reports/core.py", line 160, in create
    return report_instance.execute()
  File "/home/monod/openerp/7/addons/pentaho_reports/core.py", line 99, in execute
    return self.execute_report()
  File "/home/monod/openerp/7/addons/pentaho_reports/core.py", line 120, in execute_report
    proxy_parameter_info = proxy.report.getParameterInfo(proxy_argument)
  File "/usr/lib/python2.7/xmlrpclib.py", line 1224, in __call__
    return self.__send(self.__name, args)
  File "/usr/lib/python2.7/xmlrpclib.py", line 1578, in __request
    verbose=self.__verbose
  File "/usr/lib/python2.7/xmlrpclib.py", line 1264, in request
    return self.single_request(host, handler, request_body, verbose)
  File "/usr/lib/python2.7/xmlrpclib.py", line 1297, in single_request
    return self.parse_response(response)
  File "/usr/lib/python2.7/xmlrpclib.py", line 1471, in parse_response
    p.close()
  File "/usr/lib/python2.7/xmlrpclib.py", line 560, in close
    self._parser.Parse("", 1) # end of data
ExpatError: no element found: line 1, column 0
2013-04-12 05:38:09,263 4322 ERROR sal1 openerp.netsvc: no element found: line 1, column 0
(<class 'xml.parsers.expat.ExpatError'>, ExpatError('no element found: line 1, column 0',), <traceback object at 0xb02d6504>)
Traceback (most recent call last):
  File "/home/monod/openerp/7/server/openerp/netsvc.py", line 293, in dispatch_rpc
    result = ExportService.getService(service_name).dispatch(method, params)
  File "/home/monod/openerp/7/server/openerp/service/web_services.py", line 654, in dispatch
    res = fn(db, uid, *params)
  File "/home/monod/openerp/7/server/openerp/service/web_services.py", line 760, in exp_report_get
    return self._check_report(report_id)
  File "/home/monod/openerp/7/server/openerp/service/web_services.py", line 738, in _check_report
    netsvc.abort_response(exc, exc.message, 'warning', exc.traceback)
  File "/home/monod/openerp/7/server/openerp/netsvc.py", line 72, in abort_response
    raise openerp.osv.osv.except_osv(description, details)
except_osv: (u'no element found: line 1, column 0', (<class 'xml.parsers.expat.ExpatError'>, ExpatError('no element found: line 1, column 0',), <traceback object at 0xb02d6504>))
2013-04-12 05:38:09,340 4322 INFO sal1 werkzeug: 127.0.0.1 - - [12/Apr/2013 05:38:09] "POST /web/report HTTP/1.1" 500 -
2013-04-12 05:38:09,545 4322 INFO ? werkzeug: 127.0.0.1 - - [12/Apr/2013 05:38:09] "GET /web/static/src/img/warning.png HTTP/1.1" 304 -

When i tried to go this url http://localhost:8080/pentaho-reports-for-openerp
its give error Status 405 - HTTP method GET is not supported by this URL

Revision history for this message
El Hadji Dem (http://www.savoirfairelinux.com) (eh-dem) said :
#14

Hello James,

go to SETTINGS -> CUSTOMIZATION -> LOW LEVEL OBJECTS ->SYSTEM PARAMETERS and send me the values of parameters below :

- pentaho.server.url = ???
- pentaho.postgres.host = ???
- pentaho.postgres.port = ???
- pentaho.postgres.login = ???
- pentaho.postgres.password = ???

Revision history for this message
James Monod (james-monod) said :
#15

Hello eh.dem,

here is my configuration of system parametes

- pentaho.server.url = http://localhost:8080/pentaho-reports-for-openerp
- pentaho.postgres.host = localhost
- pentaho.postgres.port = 5432
- pentaho.postgres.login = openerp
- pentaho.postgres.password = openerp

Thanks for your help and valuable time

Revision history for this message
El Hadji Dem (http://www.savoirfairelinux.com) (eh-dem) said :
#16

Hello James, your configuration is fine.
Are you able to run correctly yr report in pentaho ??

How do you do to attach and run yr report in OpenErp 6.1 ????

Revision history for this message
James Monod (james-monod) said :
#17

Hello eh.dem,

Yes I am able to run report correctly in pentaho report designer it show me ouput.

I have not tried pentaho report in 6.1. First time I used in version 7.

Thanks & Regards.

Revision history for this message
El Hadji Dem (http://www.savoirfairelinux.com) (eh-dem) said :
#18

Hello James, try to use 6.1.I never test in 7.0

Revision history for this message
James Monod (james-monod) said :
#19

Thanks a lot for your help

I will try in 6.1 and then tell you

Revision history for this message
El Hadji Dem (http://www.savoirfairelinux.com) (eh-dem) said :
#20

Ok James, let me know if everything will be fine .

Good luck

Revision history for this message
Renato Lima - http://www.akretion.com (renatonlima) said :
#21

Hello Guys,

I'm using Pentaho Report with OpenERP v7.0, I did some changes in current branch and I made the pull request in main repo, but you can try this branch https://github.com/renatonlima/Pentaho-reports-for-OpenERP.

Best regards,

Renato Lima - www.akretion.com

Revision history for this message
El Hadji Dem (http://www.savoirfairelinux.com) (eh-dem) said :
#22

Hi renato,

have you the same problem when you follow my intructions :

I created my report in PRD (Pentaho Report Designer 3.9.1-GA.16112).

I have 2 parameters : country_param and state_param that I added to my query.

When I run my report, It works fine .I select the first param (it'is a country drop-down list) which shows all countries.

The second parameter depends on the first. It shows all states.

For example, if I select Canada for the first parameter, the second shows all states in Canada exlcusively.

When I add my report in OpenErp, I get the same wizard : I reproduced the same example, but the state drop-down list dosen't work; it seems that the value chosen in the first drop-down list does not impact the second ; It show empty list.