User Tools

Site Tools


JasperReport Printing Templates

You can define your own printing templates in GECAMed. To do so you need to have administrator rights. Go to “Admin” → “Global Settings” → “Templates”. There you will find a list of all templates you can change. Every doctor can have his own version of a template, and there is one for the whole office, too.

To manipulate a template and adapt it to your own needs you need some software tools and a working template to change (so you don't need to create it all by your own).

  1. Download the iReport Tool Version 3.7.3. Newer version of iReport might also work, but will need compatibility settings. iReport is open source software and therefore free to use. As this is an old, no longer supported version of iReport it won't work with a newer Java version (some 7 versions, 8 and later), but there is a fix to get iReport 3.7.3 running anyway: it can be configured to use a specific version of Java (iReport-3.7.3\etc\ireport.conf, variable jdkhome). To simplify the installation you can download a preconfigured iReport 3.7.3 version that runs on a standard GECAMed server. See Installing iReport 3.7.3 preconfigured for GECAMed for instructions.
  2. Download the default GECAMed template by opening the templates overview as described here (DE, FR) and clicking at the “Download this template”-Button () of the template you want to manipulate.
  3. Open the downloaded template with the iReport application.
If your iReport version is newer than version 3.7.3, you need to save the templates compatible to version 3.7.3.
You can do this as followed:
  1. Start the iReport software
  2. Open the Options-Dialog (Tools - Options)
  3. Go to iReport - General - Compatibility
  4. Choose JasperReports 3.7.3

Opening the template with the iReport tool you will see the document in the centre. At the left side you see the different zones the document is divided into. At the top you see “Parameters” and “Fields”. Don't change these. This are all parameters and fields that give you access to the GECAMed data. To get to know what parameters and fields are and how to use the iReport tool, please read the iReport documentation including a tutorial.

Cummulative Reminders

In former versions of GECAMed (prior to version 1.2) there was no option to cumulate several reminders of invoices from one doctor belonging to the same patient into one single reminder. Therefore the templates that are used for this (starting version 1.2) are not compatible with this function. If you have made your own template based on the old templates for first and/or second reminders they overwrite the new default templates, using the old GECAMed template, you will not be able to cummulate the reminders correctly.

As there will not only be one, but more invoices reminded using this option, it won't be enough to use a parameter ($P{parameter_name}) to show the data. Instead you will need to use fields ($F{fieldName}) and you will need to put these fields into the detail-band of the report, as this will be repeated for each invoice to remind. The available fields are shown at the left side at the point “Fields”.

The following parameters need to be replaced by the specified field:

parameter field
$P{invoice_number} $F{invoiceNumber}
$P{invoice_date $F{formatedDate}
$P{reminder_date $F{formatedReminderDate}
$P{invoice_amount $F{amount}
$P{invoice_payment $F{payment}
$P{invoice_balance $F{balance}

In addition the parameter $P{invoice_balance} needs to be change to the parameter $P{invoice_total_balance}. That is because the invoice_balance only contains the balance of one invoice, while invoice_total_balance contains the value of all balances.

faq/printing/templates.txt · Last modified: 2016/01/13 10:08 by gbosch