Jump to content
We've recently updated our Privacy Statement, available here ×
  • Timezone inconsistent in TIBCO JasperReports® Server Ad Hoc View export and in saved Ad Hoc Reports


    stasp
    • Version: v7.1, v7.1.0, v6.4, v6.4.3, v6.4.2 Product: JasperReports® Server

    Issue description

    By default the timezone of Timestamp fields in TIBCO JasperReports® Server reports are adjusted based on timezone selected by user. This can be disabled in non-Ad Hoc reports by adding either

    net.sf.jasperreports.sql.date.pattern.timezone=System

    net.sf.jasperreports.sql.timestamp.pattern.timezone=System

    net.sf.jasperreports.sql.time.pattern.timezone=System

    or

    net.sf.jasperreports.pattern.timezone=system

    to WEB-INF/classes/jasperreports.properties file.

    These properties are documented in JR Configuration Reference.

    However in JasperReports® Server 6.4.* there is an issue where time zone is NOT adjusted in the following use cases:

    • when exporting Ad Hoc Crosstab View to an output format with Date/Timestamp added as Row, Column or Measure
    • when exporting Ad Hoc Table View to an output format with Date/Timestamp added as Group
    • when running a saved Ad Hoc Report for any of the above two Ad Hoc View types

    Cause and possible solution

    It is possible to solve the bug in JasperReports Server Pro v6.4.3. The solution consists of two parts:

    1. Download (from TIBCO Support Portal) and install the latest hotfix for  JasperReports Server Pro 6.4.3

    2. Use the following property in WEB-INF/classes/jasperreports.properties file:

    net.sf.jasperreports.pattern.timezone=System

    Make sure the value 'System' from a capital letter.

    Do not use the other three properties listed in the description above, because they are known to lead to timezone inconsistency in Ad Hoc Crosstabs with Timestamp data type even with the hotfix.

    3. Find the following section in WEB-INF/applicationContext-formatting.xml file:

        <util:map id="applyClientTimezoneFormatting" key-type="java.lang.String" value-type="java.lang.Boolean">
            <entry key="java.util.Date" value="false"/>
            <entry key="java.sql.Date" value="false"/>
            <entry key="java.sql.Timestamp" value="true"/>
            <entry key="java.sql.Time" value="true"/>
        </util:map>

    and set all the entries to "false". Save and restart the server


    User Feedback

    Recommended Comments

    There are no comments to display.



    Create an account or sign in to comment

    You need to be a member in order to leave a comment

    Create an account

    Sign up for a new account in our community. It's easy!

    Register a new account

    Sign in

    Already have an account? Sign in here.

    Sign In Now

×
×
  • Create New...