Cognos Analytics

 View Only
Expand all | Collapse all

Cognos Analytics Display \u0000 in Data Module/Dashboard

  • 1.  Cognos Analytics Display \u0000 in Data Module/Dashboard

    Posted Wed August 09, 2023 03:15 AM

    Hi All,

    We are using Cognos Analytics version 11.2.3.

    After connecting with SQL Server DB, some columns will have additional \u0000 when displaying the data. After some investigation we found out this issue will occur for those with NULL value or this \u0000 will replace the empty string until the end of character length.

    This situation also occurs for all types of varchar, nvarchar, char and nchar.

    Please find attached the screenshot of the display from Data Module.

    Any advice or suggestion is deeply appreciated.

    Thanks and best regards,



    ------------------------------
    Mohamad Aiman Arif Mohamat Saat
    ------------------------------


  • 2.  RE: Cognos Analytics Display \u0000 in Data Module/Dashboard

    Posted Tue August 22, 2023 06:35 PM

    Not sure if this might be helpful as I am just making a guess.

    Maybe you need to put some values for the "Connection Properties" at the time of creating the Data Server connection. Check out the "sendStringParametersAsUnicode" property of Microsoft SQL Server. Maybe you need to put it into false/true - depending on what value you have. Check out the complete article.

    https://learn.microsoft.com/en-us/sql/connect/jdbc/setting-the-connection-properties?view=sql-server-ver16

    sendStringParameters...
    AsUnicode

    boolean
    ["true" | "false"]

    true
    If the sendStringParametersAsUnicode property is set to "true", String parameters are sent to the server in Unicode format.

    If the sendStringParametersAsUnicode property is set to "false", String parameters are sent to the server in non-Unicode format such as ASCII/MBCS instead of Unicode.

    The default value for the sendStringParametersAsUnicode property is "true".

    Note: The sendStringParametersAsUnicode property is only checked to send a parameter value with CHAR, VARCHAR, or LONGVARCHAR JDBC types. The new JDBC 4.0 national character methods, such as the setNString, setNCharacterStream, and setNClob methods of SQLServerPreparedStatement and SQLServerCallableStatement classes, always send their parameter values to the server in Unicode whatever the setting of this property.

    For optimal performance with the CHAR, VARCHAR, and LONGVARCHAR JDBC data types, an application should set the sendStringParametersAsUnicode property to "false" and use the setString, setCharacterStream, and setClob non-national character methods of the SQLServerPreparedStatement and SQLServerCallableStatement classes.

    When the application sets the sendStringParametersAsUnicode property to "false" and uses a non-national character method to access Unicode data types on the server side (such as nchar, nvarchar and ntext), some data might be lost if the database collation doesn't support the characters in the String parameters passed by the non-national character method.

    An application should use the setNString, setNCharacterStream, and setNClob national character methods of the SQLServerPreparedStatement and SQLServerCallableStatement classes for the NCHAR, NVARCHAR, and LONGNVARCHAR JDBC data types.https://learn.microsoft.com/en-us/sql/connect/jdbc/setting-the-connection-properties?view=sql-server-ver16


    ------------------------------
    Manu G Panicker
    ------------------------------