SAP Knowledge Base Article - Public

1995368 - CDATE generates an error in Data format if application language is not the same as OS language

Symptom

Report created against an MS Access MDB file. Within the report there are formula using the CDATE function to convert a filed to a date format.

When run in a CR for VS .NET application it generates an error in Formula if the OS language is set to English.

The OS and MDB is set for German language.

Environment

Crystal Reports Developer for Visual Studio

Reproducing the Issue

In a CR for VS Service Pack 4 application this works, after upgrading to SP 8 the error is generated.

Resolution

The solution is to set the dependent language in the application before open the report as follows:

rpt.ReportClientDocument.LocaleID = CrystalDecisions.ReportAppServer.DataDefModel.CeLocale.ceLocaleGerman;
rpt.Load(rptName.ToString(), OpenReportMethod.OpenReportByTempCopy);

Keywords

cr for vs, celocale, error in formula, CDATE , KBA , BI-DEV-NET , BI Software Development Kits (SDKs) - .NET or Other , Problem

Product

SAP Crystal Reports, developer version for Microsoft Visual Studio