Printing

The purpose of this tutorial is to help you understand the printing process and help you create new print formats. Note: there is an example/demo of creating and deploying a Jasper Report to iDempiere in the below video named "Jasper Reports Deployment Options"

Introduction to Printing

Print Format (native) Pros and Cons

Jasper Report Pros and Cons

Business Intelligence Pros and Cons

SpagoBI feature list

Print Format (native) Quick Look - Table

The videos reference here follow immediately. See sections:

Print Format (native) Quick Look - Form

The videos reference here follow immediately. NOTE: if you are updating a GardenWorld print format for export to a different client, I highly recommend you create a copy of the original print format and make your edits to the copy (and not the original). Doing so will make packing out and packing in much easier. Here are the steps to make a copy:
  1. Find the Print Format record you want to modify.
  2. Click the Copy toolbar button to make a copy of the Print Format header record. Be sure to give the new Print Format a unique Name and Description. The Description is important because (unfortunately) the next step will modify the Print Format name. You can use the Description field to find your new Print Format (just in case).
  3. From the new header (copy), click the Gear toolbar button to copy the contents of the old Print Format to the new one.
  4. You now have a complete copy of the Print Format that you can modify and propagate to other clients without risk of updating/depending on the current GW version.

Introduction to the Printing Architecture

This is more focused on Print Format (native), but it is applicable to how Jasper Reports are launched as well.

More Detail about iDempiere and ADempiere Native Print Formats

This is more focused on Print Format (native), but it is applicable to how Jasper Reports are launched as well.

Jasper Studio Installation

tutorials for Jasper Studio

Jasper Reports Deployment Options

link to Jasper example report

Jasper Studio Version Considerations

How do you know what version iDempiere is using:
  1. find /opt/idempiere-server/ -name *jasper*
  2. note for 7.1: ./plugins/net.sf.jasperreports.engine_6.6.0.jar
Note you can change the compatibility: => Window/Preferences/Jaspersoft Studio/Compability to 6.x.x Note there are two compatibility settings: Download full studio version for release 6.6.0. This is the easier (and probably better) option. Also note that you can upload jrxml directly to iDempiere (without referencing the compiled). Doing so allows you to avoid the compiler discussion because iDempiere's embedded jasper library will compile the report for you. I have not tested this approach when you have subreports (can you upload to .jrxml files instead of two .jasper files)

Configure iDempiere Data Source in Eclipse

The Jasper Studio plugin includes a PostgreSQL driver. You configure your data source as follows:

Pulling Images Dynamically in Jasper from iDempiere

It is frequently asked about pulling images from iDempiere attachments for use in Jasper as a means to dynamically load images. I believe this is possible; however it is difficult. I believe a better solution is create an iDempiere URL field on a record (instead of using an iDempiere attachment). The URL field will point to an image. You can use this URL field as a parameter to the jasper report or as a column in jasper's result set. Either way, it will be available for use as a jasper variable in the report's image path. Here is a discussion that offers more details.

Multi-Language (Translation) in Jasper

See google group discussion

Print Formats with Complicated Line Details

There are times when you need to display much line information in Orders, Shipments, Receipts, Invoices etc... Below is a picture of how you can include a great deal of information in an organized manner. Notice that I removed column headers for the line section. Instead, I am using field prefixes to label each field for easy identification. This type of example line display can scale to 30+ fields for a given line and still remain readable. iDempiere_PrintFormat_Complicated_Line_Example You can download the above example. Here are the instructions to install:
  1. Download the above zip file.
  2. Log in as System Administrator Role
  3. Open the Pack In window
  4. Save a new record
  5. Attach the above file
  6. Process the Pack In
  7. Log in to your normal client
  8. Print a shipment
  9. In the upper right corner of your shipment printout, click the drop down and choose the "Shipment Header -V2" option
  10. Note: this print format exists as System. You can copy to your client by clicking the wrench and screwdriver icon and making a copy of the print format header and line records. Do not forget to click the Gear to copy the print format lines as well.
Note the way I accomplished the labels was by adding Column SQL. I could have also added the new fields to the M_InOut_Header_v and M_InOut_Header_vt views to support translation. Please be quick to let me know if you have any trouble understanding the above concepts or installation instructions.

Helpful Links

What is not covered yet