This documentation is about a version that is out of support, here is the latest documentation version.
How about downloading a newer, supported version?
A Jasper 5.0 connector is used for creating pre-formatted reports of data extracted from a database.
The procedure below is an example, and not a reference:
Using MySQL or PostGreSQL, create a database and a table called e.g.
Use Jasper Studio to connect to the database and create a pre-formatted report in a special .jrxml format
Setup the diagram in Bonita Studio by adding a Jasper connector to a task and the variables and the form variables
Import the pre-formatted .jrxml file into Bonita which will be used to create the graphic version of the data
When the process is run, it will connect to the database in real time
The request in the .jrxml report will be executed
The data will be extracted, imported into Bonita via the connector, a report will be created and then saved in the chosen format (pdf, xml or.md) and to the chosen folder. It can be displayed directly in the Portal.
This is an example only and not a generic reference.
In MySQL, create a database with a table and information. In this example, put address as the name of the table, for example.
The structure of the table must be identical to the one below, but the names and cities can be anything you like: | INTEGER | VARCHAR | VARCHAR | VARCHAR | VARCHAR | | ------ | ------ | ------ | ------ | ------ | | id | Firstname | Lastname | Street | City | | 1 | Sherlock | Holmes | 221b Baker street | London | | 2 | Bruce | Wayne | Wayne Manor | Gotham | | 2 | Indy | Jones | 38 Adler avenue | Fairfield |
Use Jasper Studio to connect to the external database to create a report in the compatible .jrxml format.
Create a new diagram.
Create a start event, then 3 tasks: (1 human task called beforeJasper, one service task called Jasper and one human task called afterJasper), and lastly an end event.
Select the pool and create 2 documents: a bonitadocument called input (.jxrml) and an output format for the document to be created (.pdf,.xml or.md).
Go to the Details panel, Data tab, Documents panel, and click Add. In the popup, click From Bonita > Browse… > Import… (example.jrxml) to import the Bonita document.
Document | Name | Data type | | ---- | ------- | | jrxmlDocName | text |
Now to configure the first task:
Add a Jasper connector to the task.
Enter the database connection information to connect to your database.
In Report Settings, enter the name of the .jrxml document used to create the report.
Choose the output format: pdf, xml or html.
In Output operations, choose name of the object to contain the document and take the value reportDocValue.
Click on *Run.* Bonita Portal will be launched.