SAP Knowledge Base Article - Public

2310417 - Unable to check the Set to Null option on Sybase Stored Procedure Parameter in Crystal Reports

Symptom

  • Unable to check the option "Set To Null"
  • In the Parameter Prompt window, unable to set the parameter to Null in Crystal Reports, when reporting of a Sybase Stored Procedure.

Environment

  • SAP Crystal Reports 2013
  • SAP Crystal Reports 2016
  • SAP Crystal Reports 2020
       
  • SAP Sybase ASE

  • ODBC Connection using the Adaptive Server Enterprise or the CR Sybase Wire Protocol ODBC driver.

Reproducing the Issue

  • In Crystal Reports create a report based on a native connection to Sybase:
    1. In Crystal Reports, create a report to Sybase using the connection: Sybase Server.
    2. Select a Sybase Stored Procedure that has at least one parameter.
    3. The parameter prompt window show the option: "Set to Null"
  • In Crystal Reports create report based an ODBC connection to a Sybase:
    1. In Microsoft ODBC Data Source Administrator, create an ODBC connection to Sybase using one of the following ODBC driver:

      • Sybase ASE ODBC driver
      • CR Sybase Wire Protocol ODBC Driver
          
    2. In Crystal Reports, create a report to Sybase using an ODBC connection.
    3. Select a Sybase Stored Procedure that has at least one parameter.
    4. The parameter prompt window does not show the option: "Set to Null" 

Cause

  • Crystal Reports Native connection to Sybase uses SET statements to set the ANSI NULL to: OFF
         - SET ANSINULL OFF
         - SET QUOTED_IDENTIFIER OFF
     And this enable the application to show the option "Set to Null"
     
  • But with an ODBC connection, it is the ODBC driver that determine how it connects to Sybase, and it set ANSI NULL to: ON by default, but to be able to see the option "Set to Null" for a Stored Procedure Parameter prompt, it is required for the ANSI NULL option to be set to: OFF
     
  • The SAP Sybase ASE ODBC driver, have an option to set “ANSI NULL” OFF or ON in the ODBC DSN configuration.
      
  • The CR Sybase Wire Protocol ODBC driver, does not have option to set “ANSI NULL” OFF or ON in the ODBC DSN configuration.

Resolution

  • When connecting to Sybase via an ODBC connection, use the Sybase Adaptive Server Enterprise driver, and in the ODBC DSN configuration, under the tab: "Connection", check the option: "Set ANSI Null"

Keywords

Set Null Sybase, Sybase stored procedure, unable to set null, Sybase ASE ODBC , KBA , BI-RA-CR , Crystal Reports designer or Business View Manager , Problem

Product

SAP Crystal Reports 2013 ; SAP Crystal Reports 2016 ; SAP Crystal Reports 2020

Attachments

SYBASE ODBC.jpg
Sybase ASE configuration.jpg