SAP Knowledge Base Article - Public

2608622 - MS SQL Server Date fields or Stored Procedure Date Parameters, shows as text in Crystal Reports

Symptom

  • MS SQL Server date shows as text field.
  • SQL Server date field displays as string data type in Crystal Reports.
  • MS SQL Server Stored Procedure Date Parameter, prompt as a String Parameter in Crystal Reports.
  • On one computer, the date fields shows as date, but on another computer the date fields shows as string.
  • When refreshing a report on one computer, it refresh successfully, but on another one, it generates error in formula because the data type changed from a Date to a String.

Environment

  • SAP Crystal Reports 2016
  • SAP Crystal Reports 2020
  • SAP Crystal Reports 2025
                          
  • MS SQL Server 2014
  • MS SQL Server 2016
  • MS SQL Server 2017
  • MS SQL Server 2019

Reproducing the Issue

  1. In Microsoft ODBC Administrator, create an ODBC DSN to a Microsoft SQL Server database.
  2. In Crystal Reports, create a report of MS SQL Server using an ODBC connection.
  3. Add a date field to the report.
  4. Notice the database fields data type displays as date in Crystal Reports.
  5. Open the report on another computer in Crystal Reports, and after performing a verify data source, it shows the data type as a string.
           
    Why is this occuring, and how to resolve this issue?

Cause

  • The data type changes from a Date, to a String, because the ODBC Driver used to connect to MS SQL Server is an old and unsupported ODBC driver, like:
    • MS SQL Server (SQLSRV32.DLL); or
    • Another older MS SQL Server ODBC driver
               
  • When connecting via an ODBC connection, Crystal Reports query the ODBC driver to obtain the data type of the database fields, and some unsupported MS SQL Server ODBC Drivers are returning the incorrect data type: String, instead of a Date. The issue is with the version of the MS SQL Server ODBC Driver, and not with Crystal Reports.

Resolution

Keywords

CR, CRDB , KBA , BI-RA-CR , Crystal Reports designer or Business View Manager , Problem

Product

SAP Crystal Reports 2016 ; SAP Crystal Reports 2020 ; SAP Crystal Reports 2025