Config for Stored Procedures in JasperReports Server 5.5

Issue Description:

Most JRXML reports require 'plsql' designated as the query language when executing store procedures.  In these cases, extra configuration is required to run the stored procedures in JasperReports Server Pro v5.5.  You must setup a QueryExecuterFactory for 'plsql', the query language associated with most stored procedures, and you must configure the webapp to add 'plsql' as an option in the "Query Language:" drop-downs for "Edit Query" pages.


Resolution:

  1. Setup QueryExecuterFactory:

    1. Copy jasperreports-extensions-x.x.x.jar to <appserver>\jasperserver-pro\WEB-INF\lib.  (The jar can be fetched from from <ireport>\ireport\modules\ext\ or you may request a copy from Technical Support if you are using Jaspersoft Studio)

    2. Edit <appserver>\jasperserver-pro\WEB-INF\classes\jasperreports.properties, add:

      net.sf.jasperreports.query.executer.factory.plsql=com.jaspersoft.jrx.query.PlSqlQueryExecuterFactory
  2. Configure UI display:

    1. In WEB-INF, create a new xml file to represent a new bean, named something like applicationContext-customQueryLang.xml. It should contain:

      <?xml version="1.0" encoding="UTF-8"?>
       
      <beans xmlns="http://www.springframework.org/schema/beans"
             xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
             xmlns:util="http://www.springframework.org/schema/util"
             xsi:schemaLocation="http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-3.1.xsd http://www.springframework.org/schema/util http://www.springframework.org/schema/util/spring-util-3.1.xsd">
       
          <bean id="queryLanguagesCustom"
                parent="queryLanguagesPro"
                class="org.springframework.beans.factory.config.ListFactoryBean">
              <property name="sourceList">
                  <list merge="true">
                      <value>plsql</value>
                  </list>
              </property>
          </bean>
       
      </beans>
    2. Edit WEB-INF/js.spring.properties and set the value for bean.queryLanguages to queryLanguagesCustom instead of queryLanguagesPro.

    3. (optional) Edit WEB-INF/bundles/jasperserver_messages.properties or other internationalized bundles, create a new entry with values for "query.language.plsql.label", like:

      query.language.plsql.label=plsql Query
  3. Restart JasperReports Server Pro.


Reference


Ref. Case #00045140

Feedback
randomness