Incorrect date displayed on the report.
- Date are off by 100 years on some report.
- Same report were showing the expected date before.
- Wrong date returned in Crystal Reports, when connecting to a database using an OLE DB connection, and the registry key "NumberOfYearToShift" is set to 100.
- SAP Crystal Reports 2008
- SAP Crystal Reports 2011
- SAP Crystal Reports 2013
Reproducing the Issue
- Add the Registry Key: "NumberOfYearToShift", and set the value to: 100
- In Crystal Reports, create a report on any data source using an OLEDB connection.
- Add a database field of data type: Date or Date Time to the report.
- When refreshing the report, notice the date displayed is incorrect, the date is off by 100 years.
The issue is resolved in the following product updates and above:
- Crystal Reports 2013
- Support Pack 05 - Patch 7
- Support Pack 06 - Patch 1
- Support Pack 07
To workaround the issue, use an ODBC connection, instead of using an OLEDB connection for your report. To change the connection of the report in Crystal Reports:
- In Microsoft ODBC Administrator, create an ODBC DSN to your database.
- In Crystal Reports, open the report based on an OLEDB connection.
- Under the menu "Database", select "Set Datasource Location..."
- In the "Set Datasource Location" window, in the "Replace with" area, double click on "Create New Connection".
- Under "Create New Connection", double click on ODBC, and select the ODBC DSN created in step 1.
- Select under "Currnet Data Source" your connection, and under "Replace with" the ODBC connection, and click "Replace"
- Click "Close"
Now, the report is pointing to the same database, but instead of using an OLEDB connection, it is using an ODBC connection.
Since this product defect only occurs when connecting via OLEDB, the report will now display the correct date.
CR, wrong date, old date , KBA , BI-RA-CR , Crystal Reports designer or Business View Manager , Bug Filed
Crystal Reports 2008 V1 ; SAP Crystal Reports 2011 ; SAP Crystal Reports 2013