Report Designer






Report Storage

All reports of the system are available in the folder: <Plazma>/reports. The folder has subfolders. For example: bank, employee, finance, goods and etc. If you use multiple locales (USA/English, Germany/German and etc.) in the system and same report has different design (different template) for each locale possible options for the use of special folders for each locale in the format <COUNTRY>/<language>.

For example:

US/en - USA/English
DE/de - Germany/German

When using multiple templates of the same report to different locales in the mode configuration report must specify the path to the file directories without locale.

For example:

<Plazma>/reports/goods/Invoice.jasper

But physically for each locale files as follows:

<Plazma>/reports/goods/US/en/Invoice.jasper - USA/English
<Plazma>/reports/goods/DE/de/Invoice.jasper - Germany/German



iReport

To create report templates can be used report designer iReport.
You can download it from url http://sourceforge.net/projects/ireport. Detailed information on work with IReport look at the product website.



Consider the important points, designer preferences.



Settings

To set options you have to choose menu item: Options -> Settings... Then you have to select panel Compiler and set mode Use Reports Directory to Compile







Classpath

If you use additional JAR files (JDBC drivers, additional libraries, etc.), you have to set the Classpath. To set Classpath you have to choose menu item: Options -> Classpath.







To add a new JAR file, click Add and select the appropriate JAR file in the system. Then click Save Classpath to preserve variable Classpath.



Connections/Data Sources

To create a new data source choose the menu item: Data -> Connections/Data Sources and press New







Then you have to select Database JDBC connection and press Next







In the next dialog box, you need to specify properties JDBC connections and click Save








IMPORTANT! For normal JDBC connections need to add the appropriate JDBC driver (JAR file or files) to Classpath. If all the settings are made correctly, then when you press the button Test, you should see a box:







Report Import Directives

If you use own Java classes in reports, you need to import the relevant packages, classes using menu: Edit -> Report Import Directives.

IMPORTANT! This menu is only available if a report is opened.







To add imports you have to click New Import and enter package or class.







Custom Attributes

You can use custom attributes in the Plazma ERP+CRM. You can add the attributes in edit forms: references, documents, projects, task, etc (section Attributes).
To do this, you need to perform the following steps:
  • Add file <Plazma>/lib/plazma-framework-<version>-.jar to the Classpath

  • Add import org.plazmaforge.framework.report.data.* to the report.

Formats expressions for custom attributes are:

  • DataService.getValue($P{REPORT_PARAMETERS_MAP}, <Entity>, <Attribute>, <Identifier>)

  • DataService.getValue($P{REPORT_PARAMETERS_MAP}, <Entity>, <Attribute>)

  • DataService.getValue($P{REPORT_PARAMETERS_MAP}, <Entity>, <Identifier>)

  • DataService.getValue($P{REPORT_PARAMETERS_MAP}, <Attribute>)

For example:

  • DataService.getValue($P{REPORT_PARAMETERS_MAP}, "CONTRACT", "attribute1", $F{ID})

  • DataService.getValue($P{REPORT_PARAMETERS_MAP}, "CONTRACT", "attribute1")

  • DataService.getValue($P{REPORT_PARAMETERS_MAP}, "CONTRACT.attribute1", $F{ID})

  • DataService.getValue($P{REPORT_PARAMETERS_MAP}, "CONTRACT.attribute1")