Using BIRT for reporting in the ClassiX system
Note
Currently, only version 4.6.0 (OSGI only) and 4.7 upwards (POJO only) are supported. If you have installed another version, you can uninstall it and then install version 4.6.0.
Reporting in ClassiX
Instructions for creating a report from within the ClassiX system. Contains simple list reports and describes how to insert additional columns into a list or delete columns. Also describes how to create a report completely free and how to add a report to your favourites.
This document provides an overview of recommendations for new BIRT reports.
Procedure for column name changes
If access expressions for columns are changed in ClassiX or new columns are added to the BIRT report, the BIRT report has to be adapted as well. This is especially important if the access expressions change, otherwise the columns of the BIRT report cannot be filled with data anymore. To check if new columns have been added to ClassiX or if the access path has changed, the function "Layout Comparison" can be used (see also toolbar section on the report module page and in the PDF documentation). For the layout comparison, a new layout file is created from the current ClassiX list into the directory of the environment variable CX_REPORT_DATA and compared with the layout in CX_ROOT_DIR\BIRT that was defined as current until then. Depending on how the environment variable CX_DIFF_EDITOR is set, the comparison is performed with the Windows-internal Diff program (FC) or with ExamDiff (or any other comparison tool that is defined).
Edit BIRT reports
Quick guide to creating a report with grouping and diagrams.
All information on using BIRT and creating reports in the ClassiX system can be found in the PDF documentation. To make it easier to get started, a tabular and graphical overview has been created. The links refer directly to the revision pages in the PDF documentation:
Tabular overview
Subject | Special requirements for tables | Link |
Tables | Basic knowledge | |
| Insert additional table | 5.2.1 Inserting an additional table below the "normal" table |
| merge cells | |
| Groups | |
| Visibility-Rule (hiding and showing of objects, columns etc.) | 5.2.4 Different display conditions |
| Change column widths | |
| Heading of control break | 6.4 Headings of group changes should only display A-Z in an alphabetical list |
| Sorting | |
| Summary: Number of data records | |
| Dependencies on page breaks | 6.10 Avoiding Page Breaks within a Data Series |
| Text not longer than one line in a cell | |
| Calculating in tables | |
| Change if the name of a data element changes to ClassiX or a new column is to be added | |
Diagrams | Basic knowledge | |
| Configure X-axis as time axis | 6.12 Configuring the X-axis in diagrams (charts) as a time axis |
| Chart based on multiple data sources | |
Crosstabs (summation tables) | Basic knowledge | |
| Conditional display of levels in crosstabs | 6.13 Trick for Conditionally Showing Levels in Crosstabs (Summation Tables) |
data origin | Basic knowledge | |
| Add multiple data sources (DataSources) | |
| Change Data Source during runtime | |
data set | Basic knowledge | |
| "Computed Column" in DataSets = evaluation columns | |
| Joint Data Set | |
Text creation | Basic knowledge | |
Grid | Basic knowledge | |
pictures | Basic knowledge | |
Barcode | Basic knowledge | |
Masterpage |
|
|
| Report header and other changes to the page header | 5.1.1 Changing the heading of the report |
| Change the size of the margins of the report | |
Report Parameters | Basic knowledge | |
Styles | Basic knowledge | 5.2.5 Defining different display conditions (highlight rule and styles.) |
report scripting | Basic knowledge | 6.8 Example of report scripting using the example "Correctly adding the unit at totals |
| JavaScript + Expression Builder | 7. the Expression Builder: Important functions in JavaScript |
Troubleshooting | Basic knowledge | |
| CX Debug Console |
Graphical overview
Performance improvement from the reporting side
The performance of BIRT reports is influenced from different angles:
- Performance of the BIRT engine
- Performance of data extraction from ClassiX
- Performance of BIRT data access to the data source
- Performance of the report itself
The performance of the BIRT engine can be improved by not restarting the engine every time a report is generated, but starting it once at the beginning and then just using it.
On the last point, this document was created to provide an overview of the performance of different objects in the report.
Troubleshooting
There are various reasons why a BIRT report cannot be called up from ClassiX:
- Configuration error during the installation of Birt
- Authorization problems
- Error during communication between ClassiX and BIRT
- Error in the BIRT reports
- Error in ClassiX or BIRT code
Ideally, ClassiX creates or opens a BIRT report without any further user intervention. However, depending on the error case, ClassiX receives too little information to display a clear error message. In this case the communication between ClassiX and BIRT must be checked and the error message of BIRT or the calling program must be analyzed. There are two tools for this:
- Analysis of the ClassiX log file (see Logging). Specifically, when calling Birt, entries are written in the area cx.process. Especially the call as well as the parameters and the return code of the started application are logged (if necessary increase the logging level). Please check if the passed input files exist. You can also repeat the entire call from a console.
- Open the debug console. By setting the environment variable CX_BIRT_DEBUG_CONSOLE, a console is opened when Birt is called, on which the application displays possible problems. The console closes again if the call was successful. In the output of this console you should pay attention to the following points:
- Do errors already appear when calling? (Program not found, Java not installed correctly, PATH not set correctly)
- Does java not find certain classes? ("Class not found": Classpath for Birt or ClassiX libraries not set correctly, attention: the directory %BIRT_HOME%\ReportEngine\plugins must not be added to the classpath, otherwise error messages will be displayed)
- Which parameters are transferred? Do the files or parameters exist?
- Is there an exception?
Since the upgrade to BIRT 3.7.2, errors may occur when starting ClassiX without administrator rights. In this case the configuration of BIRT 3.7.2 and higher should be considered.
If a report is generated but does not contain any data, check CLASSPATH variable (see Installation Birt-Runtime). If the "addons" folder is missing in the classpath, the report layout is generated successfully, but the tables remain empty.
Error in the communication between ClassiX and Birt and error in the Birt code
The following table shows the error code, error message and possible solution strategies for an error in the Birt code or in the parameter transfer between ClassiX and Birt
Please note that every time the ReportEngine crashes, a dump file is created which may help to find the solution to the problem. This dump file is stored in the "Temp" directory (environment variable "Temp") and has the name "classix-ExecuteReportNumber.dmp".
Code | Error message | Solution |
---|---|---|
1 | Wrong number of parameters | There is probably a problem with the Java libraries required by BIRT. So the problem could be either that the BIRT-HOME is set incorrectly, that the Birt interface is not reachable or that the Java Runtime Engine (JRE) is not reachable. Please check the following:
|
2 | invalid XML | Probably JAVA is not (correctly) installed For verification or if this does not help, set the debug console to true, which will give you detailed error messages: Set "SET CX_BIRT_DEBUG_CONSOLE=TRUE" in the calling batch file. |
4: | Birt reported error during execution (Engine Exception) | Please check the following:
|
5 | (Birt Exception) | Please check the following:
Write permissions in the BIRT Runtime directory are missing. Give the directory write permissions or copy it to a location with write permissions. |
6 | FileNotFoundException | Check if rptdesign really exists and if the folder "Mandantname" exists in the directory "C:\Mandantname\Birt" (see error code 99) |
7 | UnsupportedEncodingException | It is possible that the data-xml is incorrectly encoded (it should be utf-8). Check if there are control characters at the beginning. Open the xml in Eclipse from the directory C:\temp. |
8 | IO Exception | |
12 | The BIRT-Server was started by the first ClassiX user with his user rights. If now another user wants to create a BIRT report as well, it is recognized that a BIRT Server is already running and the task is sent to him. In this case the BIRT-Server does not have the rights to access the user's temporary directory. This can be remedied by setting this variable: SET CX_PREVENT_BIRT_SERVER=TRUE This variable prevents the BIRT server from starting automatically, so that each user calls their own instant of BIRT. | |
99 | Exception (e.g. with a zero-pointer exception)
| Other errors; check the following:
|
100 | Unknown error java.lang.OutOfMemoryError: Java heap space | Set environment variables in the calling batch file: SET _JAVA_OPTIONS=-Xms512m -Xmx1024m |
The system cannot find the specified path | The folder "Client name" must exist in the directory "C:\Mandantname\Birt", since the report is saved by the report designer in this directory. If the folder does not exist, the report cannot be created correctly. The error message in the debug console is then: "the system cannot find the path you entered". | |
Value specification in totals line is incorrect EUR 232,479,000,000. instead of EUR 2,324,79 or Description of the Y-axis of the Sequential Graph consists of several black columns (characters that are superimposed on each other to form black columns) | This behavior occurred in an English language operating system environment with German ClassiX Locale. In the runtime folder of BIRT (%BIRT_HOME%\ReportEngine\configuration\) the config.ini must be extended by the following entry osgi.nl=en_EN This sets the locale hard to German, so that the sum calculation is correct again or the Description column of the Sequential Graph is displayed correctly again. | |
See solution for error 5: Full access to ReportEngine\configuration This message may appear if GESTIN has been installed in the Program Files folder. | ||
A 0 KB PDF is created in REPORT_DATA. (Empty PDF, which a PDF reader cannot open) Is sometimes also output as "Internal error" with error code -1. |
|
Error in the BIRT reports
Errors in the birth reports can become apparent at different times. It is best if the errors are detected while the report is being created (for example, when using the preview tab, for an explanation, see Editing Birt Reports). The following errors have occurred during the revision of reports and their resolution is documented (for a more detailed explanation of the errors, see this document)
Often a blank PDF is displayed if there is an error in the Bird Report. In order to find the reason for this, the report should be opened in BIRT-Eclipse (from ClassiX) and then tested via the preview (tab). There you will usually find a more detailed error message in a similar style as in the examples in the following table.
General procedure for fault investigation
- Is an error message displayed in the PDF? Is a blank PDF printed?
- More detailed error messages can always be found in the preview tab in BIRT-Eclipse (for an explanation, see Editing Birt Reports).
- Check:
- Can a preview be created, or does an error message and a Java stack trace appear directly? Is a data type possibly set incorrectly? For example: It is to be checked by a string instead of a float whether a value is smaller or larger.
- A preview with a red error message is displayed. If a particular report object is mentioned in the error message
- ?
- table:
- Is a specific column displayed? For example "Column Binding "delivered.mlDescription"": Check in the property editor for the table whether the binding is set correctly / still exists, etc.
- Error with org.eclipse.datatools.connectivity.oda.OdaException: Table may not be able to access the data source. Check paths and environment variables
- Is a specific expression displayed? Search for this expression in the XML code of the report to determine the exact location of the error call. Important: Each report object has a number by which it can be uniquely identified.
- Number of an object: Is there a reference to an object with a specific number? Each report object has a unique number by which it can be identified
- table:
- Is no error message displayed in the preview? Does a report object have a cross in the outline (usually bottom left)? This indicates that this report object is not working properly.
- If an error cannot be directly assigned to a report object or the error message cannot be interpreted. It is best to remove the report objects individually (images, data bindings, grids, tables) and check each time whether the error still occurs. This allows you to identify certain objects
Error message Solution Solution Table table:
Column Binding "delivered.mlDescription" has referred to a data set column "delivered.mlDescritpion" which does not exist.Bindings of a table are not up to date For example, if the name of a variable was changed within ClassiX (instead of delivered.mlDescription to delivered.new.mlDescription), Birt cannot find this variable in the data source.
So the dataset must be edited and the new column added. However, any existing references in the table must then be changed. For example, it is possible that a column binding had a reference to delivered.mlDescription, or that a column binding itself is called delivered.mlDescription. To check this, click on the table and check the bindings in the property tab. If this is not done, the error message will appear.Table table:
An exception occured during processing. Please see the following message for details: Cannot open the connection for the driver: org.eclipse.datatools.enablement.oda.xmlA data source is not available This error message occurs if the data source specified in the data source tab does not exist. This error should not occur in the new version (recognizable by the fact that the xml files are stored in "C:\temp"), if the report is called from ClassiX, because a data source is generated automatically.
To fix the error you have to check the data source in the data source tab. You should check if this file exists and if necessary specify another one. If the new data-source works can be tested via "Text Connection".A BIRT exception occurred. See next exception for more information. Invalid javascript expression pression
Error in the Javascript expression It is possible that only the brackets are wrong in this case. If the error message does not directly show the incorrect script. It is best to search for a term from the error message (for example "currency2") in the xml source code (in the tab "XML Source"). Table table:
- A BIRT exception occurred. See next exception for more information.
Can not convert the value of to Binary type. (Element ID:374)Error in the type of a binding in the table (here with a picture) Most likely, an element in the table has the wrong type and therefore cannot be used by BIRT. To check this, first open the Binding Tab of the table (Select Table > Properties Editor >Binding). The Data Type column may contain "Blob". In this case, an element used to display an image had the type "Blob". This had to be changed to "String".Table table:
+ Next data row cannot be retrieved
org.eclipse.datatools.connectivity.oda.OdaException: The xml source file cannot be found or the URL is malformed. (Element ID:376)BIRT cannot reach the data source Probably the environment variable "CX_REPORT_DATA" was not set as environment variable in Windows, or the value of the Windows environment variable "CX_REPORT_DATA" does not correspond to the value environment variable in the calling batch file of ClassiX. Since both Eclipse and ClassiX access this environment variable, the environment variable must be defined as Windows environment variable. ClassCastException: "Error while executing the report". Data type of the element incorrect In the preview, the report is not displayed (not even empty), but a window is displayed in which this error message and Java stack trace are displayed. If you are asked if you want to "<0" oder ">0" ist so muss es als Float und nicht als String definiert werden. Dies muss im DataSet entsprechend angepasst werden.
Hinweis
Currently only version 4.6.0 (OSGI only) and 4.7 upwards (POJO only) are supported. If you have installed another version, you can uninstall it and then install version 4.6.0.
Call BIRT from the command line
The following parameters must be known:
path to the birt_interface.jar
BIRT_HOME (check in the command line: set birt_home)
XML file
BIRT Design
Target file name
java -classpath "Pfad_zur_Birt_interface.jar/birt-interface.jar;%BIRT_HOME%/ReportEngine/lib/*" org.instantview.report.exec.ExecuteReportClient C:\Temp\invanaly-Sequenzialtest.xml Y:\classix\Evaluate\BIRT\invanaly-Sequenzialtest.rptdesign C:\Temp\Sequentialtest.pdf