Hi all,
we have designed a dashboard in ireports and have declared "MetaDataConnection" as a parameter which establishes a connection with the database.
The class Type of the parameter is "java.sql.Connection" and default value expression is "java.sql.DriverManager.getConnection("jdbc:mysql://localhost/jasperserver", "username", "password")".
The above connection works fine but when it crosses more than 200 connections which is the limit, the dashboard crashes. After every click a connection is established.
I then tried to use another parameter called "CloseDataConnection" in which i used the class type as "java.sql.Connection" and the Default value expression as "$P{MetaDataConnection}.close()"
but unfortunately this dosent work and i dnt knw how to close the connection in ireports.
I am not getting anywhere with this problm. Have tried searching on google and ireports forums but no result.
If anyone knows the solution to this problem please reply back as soon as possible.
I just need to close the connection evrytime when it executes the query.
Please if u knw the solution, then reply back asap.
Cheers