Jasper Connector - How to send Jasper parameters from the bonita connector

1
+2
-1

Hello

I need some help understanding how to send data to populate the value of the parameters in my jasper report file.

I created a report which needs a parameter in order to filter the resulting data, as follows:

SELECT 
*
FROM
    PACIENTE E
    INNER JOIN EXAMEN N ON ( N.PACIENTE_PID = E.PERSISTENCEID )
    WHERE  N.PERSISTENCEID IN  ( $P!{paramExamenId} )) N
    ORDER BY N.PERSISTENCEID ASC

As you see, the paramExamenId is needed in the Query, and this value must come from Bonita. Using the Jasper Connector I see the Parameters table at the connector wizard. I set some values in that table, but the report fails to execute. How does that parameters table work? How can i share data from bonita to the jasper report?

Bonita 7.1.0

Regards,

Jose

2 answers

1
+1
-1
This one is the BEST answer!

Found the solution: my environment was bad. I needed to add jars to fulfill the dependencies of the connector. The dependencies are (as for the documentation for the dependecies for Bonita 6 - hasnt been updated for version 7):

  • commons-digester-2.1
  • itext-2.1.7.js2
  • itextpdf-5.5.7
  • jasperreports-5.6.1
  • jcommon-1.0.15
  • jfreechart-1.0.12

Comments

Submitted by jose.siu on Mon, 10/26/2015 - 21:27

I forgot to say that the Params table works as expected: Param column you will set the name of the param as you created as the jasper studio. Then the value column you set the value base on the paramType. So, it is very straight forward.

Submitted by romualdo.s.rs on Thu, 08/03/2017 - 19:32

I'm having trouble getting my jasper connector working too, I tested at the Jasper Studio and it worked normally, did you get your jasper connector working? Where did you find these missing JARs?

1
0
-1

I encountered some problems with passing a Timestamp value to a Jasper report query parameter.

This is working for me:

1) define a string parameter in jasper like $P{reportDateString}
2) add the parameter in the jasper query and explicitly cast it to timeStamp (e.g. .... WHERE date is $P{reportDateString}::timestamp ( postresql example ) )
3) assign the jasper parameter in the bonita jasper connector and write a script to convert the bonita timestamp to string (something like return new Date().toTimestamp() etc)

The Timestamp is generated by bonita, converted to a string value, passed as a string to the jasper report and converted back to Timestamp in the jasper query. If anyone knows of a way to pass the timestamp directly to jasper. Please let me know.

Notifications