We create and adapt free software

Access database structure from iReport

We have recently added a new feature to jasper_reports module that allows users to have access to fields structure from iReport, avoiding the need of creating the XML file. Note that although the module works with both v5 and v6 this feature will only be available in v6.

Using this functionality is really easy. Simply install latest version of jasper_reports module and in iReport create a new Remote XML file datasource. And in XML URL specify OpenERP's XML-RPC URL and append "/jasper/" and the internal name of the model we want to use (in the example "purchase.order"). After that we can add several paramaters, but all of them are optional, because they can be specified in openerp's server configuration file and they also have default values.  Here's a list of parameters available:

URL Parameter Server parameter Default Value Description
database jasper_database demo Name of the database
user jasper_user admin Username
password jasper_password admin Password of the user
depth jasper_depth 3 Depth of the tree of fields to use
language jasper_language en Language to use for field labels. Use language & country, such as "ca_ES".

Example: "http://192.168.0.1:8069/jasper/purchase.order?database=demo&user=admin&password=admin&depth=3&language=ca_ES"

Once you've created the datasource, you can go to the database section, select XPath as language and you'll have all fields available, the same way you did when you created an XML file.

Note that there's still a small bug in the module with no consecuences from a user's perspective but that will show a traceback in server's log. If someone wants to fix it, a patch will be very welcomed!

Comments

Post new comment

The content of this field is kept private and will not be shown publicly.
Type the characters you see in this picture. (verify using audio)
Type the characters you see in the picture above; if you can't read them, submit the form and a new image will be generated. Not case sensitive.