Wednesday, 29 June 2016

hybris-Config iReport tool to build jasperreport

Here is the step by step to create jasperreport by iReport tool and use in Hybris.

1. Download iReportDesigner

2.Open iReportDesigner,
Add Classpath: Tools > Option > Classpath, add
[hybris home]\ext-platform-optional\virtualjdbc\bin\virtualjdbcserver.jar
[hybris home]\ext-platform-optional\virtualjdbc\lib\vjdbc.jar
[hybris home]\ext-platform-optional\cockpit\bin\cockpitserver.jar

3. New a DataSource with these information
JDBC Driver: de.hybris.vjdbc.VirtualDriver
JDBC URL: jdbc:hybris:sql:http://localhost:9001/virtualjdbc/service
Username: admin 
Password: nimda 
(It is hybris username, not DB username)

Click Test button, it should be connect successfully ( If not, check if Hybris is running)

4. Create a sample report
 In iReportDesigner, File -> New -> Blank A4 Template
Click the button "Report Query" , write a sample Query (it can be normal SQL query or it can be a Flexible query)

For example:  SELECT {p.code}, {}, {p.description} FROM {Product AS p}
Then we will drap and drop the Column name into Detail Section, define header and ajust text if you want
**** To create parameter for report
In left panel, select Parameters -> Add.
****Note: In iReport Designer 5.5  we have "uuid" arrtibute, we should remove it before upload into hybris (in Notepad++, replace by expression uuid=".*" with space)

To import *.*.jrxml into Hybris, we have 2 options:

1. Create widget in ReportCockpit,then upload file .jrxml
2. User impex file to import:
The format impex file as following:

# Language


INSERT_UPDATE JasperMedia;code[unique=true];realfilename;@media[][forceWrite=true];folder(qualifier)[default=$jasperreports_folder];icon(code)[default=icon_jasperreport_wizard];$catalogVersion;mime[default='text/xml']

# Create Countries
UPDATE JasperMedia;code[unique=true];$catalogVersion;title[lang=$lang];reportDescription[lang=$lang];description
 ;MSCS-4015-Coupon1600Report;;"MSCS-4015-Coupon1600Report";"This widget displays orders which have been applied 1600 CNY Coupon";"MSCS-4015-Coupon1600Report"
5.  work is done    


  1. Hello !
    Welcome to the "Directory Blogspot"
    We are pleased to accept your blog in the division: INDIA
    with the number: 495
    We hope that you will know our website from you friends,
    Invite your friends by giving them the "Directory award"
    This is the only way to expand the site.
    The activity is only friendly
    Important! Remember to follow our blog. thank you
    Have a great day
    For other bloggers who read this text come-register
    Imperative to follow our blog to validate your registration
    Thank you for your understanding
    Get a special price "Directory award" for your blog! with compliments
    Best Regards
    A pleasure to offer you a degree for your site

    1. Thanks for the post, I am techno savvy. I believe you hit the nail right on the head. I am highly impressed with your blog. It is very nicely explained. Your article adds best knowledge to our Java Online Training from India. or learn thru Java EE Online Training Students.

  2. please provide the erp integretion detials

  3. please provide the erp integretion detials

  4. super information provided in u r blog its most usefull for all entry level developers
    sir ..