WebKit Report

Hi ,

     I am writing this blog using my own hand and i successful create my first report without any     

     guidance.I think it's not bad

thanks

 

Introduction

This document mainly used for create a webkit report in any modules.

Here we declare how to create report and how to make change in report style .

Webkit report capsulate many separates features like as table style , font ,border etc. So if any change made in future then we go immediately its seprates files and changes according our need.

WebKit Report Engine

Install WebKit Report Ingine

Webkit engine module already developed by OpenERP. Just go to search “Webkit Report Engine” and install it.After install it we need one extra file that are used for convert html to pdf using the webkit rendering engine, And download the “wkhtmltopdf”
When we installed webkit report engine then it creates two sub menu inside the

companies sub menu of setting menu.
         1. webkit logos
         2. webkit header/footers

Companies menu

Inside this menu we set the path of webkit so declare the Webkit Executable Path .

Here gives the path of where located “wkhtmltopdf” file. If any problem to identify the location of

wkhtmltopdf then open the terminal.

 

Type the command “locate wkhtmltopdf”. 

Without given this path we can not generate webkit report . So it is important.

Webkit logos

Here we can select logo or background images which are used in our report

Webkit header/footers

Inside this menu we can make change in “Css style ” In Css (Cascading style sheet) we define type of table ,font of text ,border style,path of background image etc.
Suppose we want to add background image then we go inside css Style and set the
tag . “background-image:url('/home/dhawal/Desktop/paper.jpg');”

 

In webkit report engine default three table are define we can make extra table
parragrap ,wordspacing according the need.

How to create report using webKit

There are some steps which are as follows:
1. We make a folder inside the module where we want to generate webkit report.
2. We create 4 files which is as fallows.
      • init.py:
           ◦ Import another reporting py file.
      • .xml file:
           ◦ Make the link which shows on browser.
      • .mako file:
           ◦ This file make change report as we want .
We can also copy these files which are inside in “report_webkit_sample” and make changes as well as requirments.

Mako file

In this file we call all the function that define in Css body, header,tables, company logo, etc. And set the object of fields.Webkit report engine have many function when we create report they automatically execute and fetch the correspondence fields values.

Conclusion

There are several method to generates report but Webkit report gives us better functionality to generates a report in a single touch means to say that if any change make in report in future then we can easly change the layout of table ,Background Image ,space between word , Border, logos or fields these functionality are not in Rml files so it is simple to genearate report through webkit as comparison to Rml report.

REPORT VIA JASPER

Create report via jasper..

1] Simple need to download "jasper_reports" module and put it in Addons

2] After that need to download "iReport-4.8.0" and put it in Desktop.

3] Go go terminal and just go it's path like this "dhawal@dhawal-master-pc:~/Desktop$ iReport-4.8.0/bin/ireport"   press ENTER.

A  net bean window will open.

 

4]when you install jasper module then it create a menu inside configuraton.

5]Go and create a select a object for creating a xml template with 1,2,3 depth. file will be created.

 

6]That template we paste in "custom_reports" folder that is in jasper report module.

7] Create a database and click new ,, Select  XML file datasource --->next--> select xml template file and select a first check box...

Give name for database name and postgress connection password and user name.

 

8] GO-->setting/jasper report/and select object to print for report and add item for jrf file and save with default check box menu Go to that object menu and select record and go for print you can see menu item there for click to enarate report

9] Template inspectpor gives you all functionaly for work on report. 

PENTAHO REPORT

Pentaho report work same as Jasper Report.

As my experience Jasper Report is better as comparison to Pentaho.

 

1=>http://www.baconconsult.eu/home/our-products/openerp/openerp-printing/reporting---pentaho-and-openerp2]

 

2=>http://sourceforge.net/projects/jfreereport/files/04.%20Report%20Designer/

 

Download PRD and paste java file inside PRD/lib folder.

 

and start server like this..

dhawal@dhawal-master-pc:~/Downloads/report-designer$ ./report-designer.sh