Jump to content
JasperReports Library 7.0 is now available ×
  • Enabling DBCS-Open Data Type Fields in JasperReports Server - for IBM DB2


    Shrikant B
    • Edited on:
    • Features: Domains Version: v8.2.0, v8.0 Product: JasperReports® Server

    This article addresses an issue encountered by users of JasperReports Server who work with IBM DB2 databases containing DBCS-Open (Double Byte Character Set - Open) data type fields. These fields may not be visible in the domain editor while creating a domain, causing inconvenience and confusion for users. This article provides step-by-step instructions on how to configure JasperReports Server to detect and display DBCS-Open data type fields in the domain editor.

    Issue:
    Users may face challenges when working with specific data types, such as DBCS-Open, especially when integrating with databases like IBM DB2. This article aims to assist users in resolving the issue of DBCS-Open data type fields not being visible in the domain editor of JasperReports Server.

    Resolution:
    To enable the detection and display of DBCS-Open data type fields in JasperReports Server, follow these steps:

    1.  Locate the applicationContext-jdbc-metadata.xml file:

    2.  Navigate to the deployed JasperReports Server directory (e.g., .../WEB-INF/applicationContext-jdbc-metadata.xml).
    Edit the jdbcMetaConfiguration bean

    3.  Within the applicationContext-jdbc-metadata.xml file, locate the jdbcMetaConfiguration bean.
    Modify the jdbc2JavaTypeMapping property:

    4. Within the jdbcMetaConfiguration bean, find the jdbc2JavaTypeMapping property.
    Add an entry for "CHAR () FOR BIT DATA"

    5. Inside the jdbc2JavaTypeMapping property, locate the <entry key="OTHER"> definition.
    Add the following entry under <entry key="OTHER">:
    <entry key="CHAR () FOR BIT DATA" value="java.lang.String"/>
    The entry will look like this inside the file:

    <entry key="OTHER">
        <map>
            <entry key="NVARCHAR2" value="java.lang.String"/>
            <entry key="uuid" value="java.lang.String"/>
            <entry key="undefined" value="java.lang.String"/>
            <entry key="CHAR () FOR BIT DATA" value="java.lang.String"/>
        </map>
    </entry>

    6. Save the changes and restart the JasperReports Server.

    Verify the visibility of DBCS-Open data type fields.

    After restarting the server, retry creating a domain in the domain editor.
    You should now be able to see the DBCS-Open data type fields in the domain editor.


    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...