Jump to content
We've recently updated our Privacy Statement, available here ×

Badr Draifi

Jaspersoft Staff
  • Posts

    34
  • Joined

  • Last visited

  • Days Won

    3

 Content Type 

Profiles

Forum

Events

Featured Visualizations

Knowledge Base

Documentation (PDF Downloads)

Blog

Documentation (Test Area)

Documentation

Dr. Jaspersoft Webinar Series

Downloads

Everything posted by Badr Draifi

  1. There are 4 ways where you can configure your reports query to timeout when running in Jaspersoft Server, depending on your use case : For Ad hoc reports: From the UI, in Manage->Server Settings->Ad hoc settings-> Ad Hoc Query Timeout (seconds)Inside your Studio report, in the jrxml file, add the attribute : net.sf.jasperreports.jdbc.query.timeout (http://jasperreports.sourceforge.net/config.reference.html#net.sf.jasperreports.jdbc.query.timeout). Note that this property might be affected by the globale timeout of the report : (http://jasperreports.sourceforge.net/config.reference.html#net.sf.jasperreports.governor.timeout)Set the property net.sf.jasperreports.jdbc.query.timeout in $ServerApp/jasperserver-pro/WEB-INF/classes/jasperreport.properties so it will affect all reports running in Jaspersoft Server. Note that if the same property is already defined in a jrxml studio report, it will be taken into account instead of the one in jaspereport.propertiesInside the JDBC/JNDI datasource definition (depends on the database driver), this will apply on all database requests.
  2. If you are using a domain connecting an Athena data source. The timestamp fields are displayed correctly in Ad Hoc. However, if you create a filter for this timestamp field, the code generated does not work. Jaspersoft Server at the time of this wiki is not supporting the Amazon Athena database, some particular use cases like this one might present issues, but you still can solve it since Jaspersoft Server is highly configurable. Resolution : 1. The root cause is that Timestamp generated by Jasperserver is not supported by Athena. Should replace the Timestamp function by the date_parse by adding a new Entry for the supported Athena functions in file: applicationContext-semanticLayer.xml (acs) (see line 838) => The value: AWS.Athena in the property : <property name="productName" value="AWS.Athena"/>, can not be changed, it represents the name of the database returned by your driver as per the JDBC specification. If you changed your driver you will need to check the new returned value in the method DatabaseMetaData#getDatabaseProductName() of your new driver (either from the documentation or directly in their code) The returned value from your current driver is AWS.Athena as specified in their link : https://www.simba.com/products/Athena/doc/Simba_Athena_JDBC_ReleaseNotes.txt => For further changes, I can see in the AWS Athena documentation the link to the supported functions that can replace the default one in acs (date/time/aggregations...) : https://prestodb.io/docs/current/functions.html 2. Keep replacing the supported Athena function in AWS.AthenaSqlGenerator bean, to keep the default one intact and operational for other non Athena datasources 3. You can add a debug log level on those classes on the Server settings->Log settings, for detailed logs in jasperserver.log file : net.sf.jasperreports.engine.query.JRJdbcQueryExecuter com.jaspersoft.commons.semantic.dsimpl.SQLGenerator com.jaspersoft.commons.semantic.dsimpl.JdbcBaseDataSet 4. Restart the server to test the changes.
  3. You can change the look and feel of your Ad hoc report by using Jasperserver Ad hoc templates via JS Studio, where you can add parameters and other elements. Here's a how-to for Ad hoc templates: https://community.jaspersoft.com/wiki/how-create-adhoc-templates-jaspersoft-server
×
×
  • Create New...