Creating Jasper Reports- Installation Guide

        Jasper Reports are mainly used for creating stylish reports other than black and white report. We can add tables, charts,crosstabs etc., in to the jasper report and also we can generate different forms of reports like pdf,xls,html etc. For creating Jasper Report, iReport plays an important role. Using ireport we can simply create Jasper Report. I’m using iReport 4.0.1.

        Jasper report and openERP integration can be done by adding jasper_reports module to our openERP server. Now Open the opneERP client. In  customization menu under the administration menu  we can find the a menu for creating jasper report template.

Click on it, provide the information asked then an xml file wil be generated. This file is needed for the creating Jasper report. Save the file . For now our  work in the openERP client is completed. Now go to iReport open a newblank report template. Change the datasource or create new datasource by clicking on in the ireport toolbar.  Add a new xml datasource by providing the of the xml file generated from the openerp client.

After creating the xml datasource change the query language by clicking on in the iReport Designer bar.  Then a window will open for changing the query language.Change the query language to xpath.

        These are the basic things to be done for creating a jasper report. Now we can create a module in our openerp server and start creating jasper reports.

Comments

omalbastin: Hello John, I think you have the correct jasper report module, you can also download it from launchpad or use this jasper report that we have uploaded http://dl.dropbox.com/u/12447821/jasper_reports.zip . To install this module you have to unzip the jasper_reports.zip because of the size of the module( approx. 50Mb) it is difficult to import this zip file. So unzip the module to your openerp server's bin/addons folder, then restart the server and update the module list, install the jasper report module.Thats it!!".

Leave a Reply

Your email address will not be published. Required fields are marked *

  1. john says:

    Hi Mr. Omalbastin

    Can i ask u something?

    I would like to know how to install module to openerp? so that the openerp menu in adminstration > customization > jasperreport will shown.

    I have tried searching the google for a long time. But i still can’t figure it out.

    I did download a file called jasper_reports.zip (40mb). and when i opened the file, it contain lot of file, like python, jasper_demo.xml, jasper_report.py, report_xml.py, report_xml_view.xml

    Is this the file that i should imported to openerp? if not what should i do? which one is the module that i should installed?

     

    Thanks so much 🙂

    John

    1. omalbastin says:

      Hello John, I think you have the correct jasper report module, you can also download it from launchpad or use this jasper report that we have uploaded

      http://dl.dropbox.com/u/12447821/jasper_reports.zip

      . To install this module you have to unzip the jasper_reports.zip because of the size of the module( approx. 50Mb) it is difficult to import this zip file. So unzip the module to your openerp server’s bin/addons folder, then restart the server and update the module list, install the jasper report module.Thats it!!

  2. oogii says:

    Hello! Omalbastin.
    I want to ask from you one question.I’m using OpenERP GTK Client 6.0 software. How can I use the jasper report. Is it possible ? It only work in Nan-tic OpenERP client version or not?

    1. Omal Bastin says:

      Hi,
      Jasper report module works fine in openerp 6.0 and also in 6.1rc. You just need to download the module, extract it to the addons folder and restart the server.
      Thank you

      1. jamartin says:

        Also in 6.1rc? I managed to make it work on 6.0 series, but i have installation errors on 6.0
        from service.http_server import reg_http_service, HttpDaemon
        ImportError: cannot import name HttpDaemon

      2. Aamir Riaz says:

        NaN-tic Jasper Reports module does not install in OpenERP 6.1x:
        from service.http_server import reg_http_service, HttpDaemon
        ImportError: cannot import name HttpDaemon

  3. college essay says:

    In my opinion it should be really great to use it!

  4. laptvn says:

    Hi,
    Can you show me how we configure to export a jasper report to excel format?
    Thanks,
    Lapptvn

    1. Omal Bastin says:

      Hi,
      From the Main menu goto Administration>customization>Jasper Reports> Jasper Report.
      Create a record for adding the jasper report we have created, add the jasper report jxrml file,select the model where you want to show the report, provide a service name for the report and select jasper output as xls.Then the report will be printed in excel format.
      Thank You

  5. Anonymous says:

    hallow sir,
    I have created a jasper report with chart,but I want to create hyper link in the current chart(pie).How it can be implement………kindly explain me step by step….
    thank you.,,,,,,,,,,,,,,,,,,

  6. Marc says:

    I ran into this error:
    Report Error
    Failed to invoke method execute in class com.nantic.jasperreports.JasperServer: org.xml.sax.SAXParseException; lineNumber: 2; columnNumber: 459; cvc-complex-type.3.2.2: Attribute ‘uuid’ is not allowed to appear in element ‘jasperReport’.
    Any ideas??

    1. omalbastin says:

      Hi Marc,

      Please check from where this attribute 'uuid' comes from. Maybe by mistake u have passed 'uuid' for user id instead of 'uid'

      1. Marc says:

        Thanks omalbastin,
        My problem was solved 🙂
        From your idea about uuid, i searched on google and uninstalled lastest version 4.6, installed 4.5.1 version.
        Worked without any errors.
        thanks a gain

    2. Zorobabel says:

      Hi! I found a solution (temporal, I think). It's error is due to the parser, conflict of versions of JasperReports and iReport (I think :P). I don't exactly where is the problem but you can use Kate (or another decent text editor with regular expressions support) for open you *.jrxml file to find and replace using the regular expressions option: Find: \suuid=\".{36}\" Replace: It will clear you file of this conflictive attribute. My best regards!

      1. omalbastin says:

        Thank you Zorobabel

        1. Zorobabel says:

          You're welcome, Also do you help me

    3. Zorobabel says:

      Hi againd, I found a permanent solution: You must check your JasperReports version. If you will use JasperReports x.y.z, you must have iReport x.y.z. I was using iReport 4.7.0 for JasperReports 4.0.1! 😛 You should download the files from: http://sourceforge.net/projects/ireport/files/iReport/iReport-4.0.1/ https://launchpad.net/openobject-client-kde/5.0/5.0.5/+download/jasper_reports.zip The official project page for JasperReports OpenERP's OpenObject is: https://launchpad.net/openobject-jasper-reports/ (obviously to download you must clone the repository with bazaar) The former was: https://launchpad.net/openobject-client-kde Good luck!

  7. trung says:

    hi omalbastin,
    i created a report using sql method.
    How can i import dynamic parameters in report.
    parameters depend on search, filters.. on openrep.
    This is possible?
    Any suggestion?
    Thanks

    1. omalbastin says:

      Hi trung, Can dont get it. can you explain it.

      1. trung says:

        Thanks for your reply.
        I Created Datasource by using Database JDBC connection instead of XML file datasource to connect openerp database and use SQL.
        Instead Xpath i used SQL.
        With Xpath, when send report to server, user filter some conditions and print report. The report will contain data which user filtered.
        I want to ask: With Creating report via SQL method, how can report show data which user filterd before.

        1. Prajul P T says:

          Hi,

              If we are using the JDBC datasource, we have to do the filtering in using the SQL itself but we can specify the condition in which the filtering has to be done. For example if i want to display the lang of the partner which the user selects, we can pass the id of the partner that the user select to iReport using parameter. The parameter can be passed from the report python file as:

          These parameters will be available in the iReport if we create a parameter in iReport as "partner_id" and can be used in our SQL query. So my query will be:

          "SELECT lang FROM res_partner where id = $P{partner_id}"

          1. ibrahim says:

            if I want to display by ‘purchase_order.id’ for parameter $ P {order_id} what the best solution?
            example:
            SELECT * FROM WHERE purchase_order purchase_order.id = $ P {order_id}

  8. This is a topic that’s close to my heart… Take care! Exactly where are your contact details though?

  9. ibrahim says:

    I am trying to create a report from iReport, but there is a warning error:
    File “/opt/OpenObject/OpenERP/addons/addons_6.1/jasper_reports/JasperReports/JasperServer.py”, line 100, in execute
    raise osv.except_osv(_(‘Report Error’), e.faultString)
    except_osv: (‘Report Error’, ‘Failed to invoke method execute in class com.nantic.jasperreports.JasperServer: null’)
    2013-06-11 07:03:06,857 8366 ERROR ? openerp.netsvc: Report Error
    Failed to invoke method execute in class com.nantic.jasperreports.JasperServer: null
    anyone know a solution this problem?

    1. omalbastin says:

      Hi,
      Please install/update java jdk package in your system. Also please check the  versions of  iReport you use to create jasper report and the jasper_report jar package is same. If problem exits try by deleting the *.jasper file from your custom jasper report module.

      1. ibrahim says:

        Hi, thank you for your comment.
        I’ve updated java jdk package. Now I use iReport version 5.1.0 and JasperReports Server CP 5.1.0, but after trying again the result remains the same, there is the same error warning.
        except_osv: (‘Report Error’, ‘Failed to invoke method execute in class com.nantic.jasperreports.JasperServer: null’)
        2013-06-11 14:28:42,088 2893 ERROR ? openerp.netsvc: Report Error
        Failed to invoke method execute in class com.nantic.jasperreports.JasperServer: null

        1. Prajul P T says:

          Hi,

              Inside your jasper_reports module go to folder java -> lib. Please check weather there is a jar called jasperreports-5.1.0.jar. If not please update the library using the file update-jasper-reports.sh inside the same folder. Command format for updating is:

          python update-jasper-reports.sh <path to your iReport 5.1.0>

          1. ibrahim says:

            Hi Prajul,
            I run the command:
            python update-jasper-reports.sh /opt/iReport-5.1.0/
            there is an error warning :
            File “update-jasper-reports.sh”, line 3
            if [ -z “$1” ]; then
            ^
            SyntaxError: invalid syntax
            Which command should be run?
            python update-jasper-reports.sh or
            ./update-jasper-reports.sh

          2. Prajul P T says:

            Hi,

                Please run as ./update-jasper-reports.sh. 

          3. ibrahim says:

            warning error persists,
            ERROR ? openerp.service.web_services: Exception: (‘Report Error’, ‘Failed to invoke method execute in class com.nantic.jasperreports.JasperServer: null’)
            is there any other suggestions?

      2. ibrahim says:

        Hi omalbastin,
        I tried other versions of iReport and in the beginning of the trial reports can be printed, but if there is an improvement in jrxml file then the error alert appear again:
        Failed to invoke method execute in class com.nantic.jasperreports.JasperServer: null

© 2020 Zesty Beanz Pvt Ltd All Rights Reserved.