SAP Knowledge Base Article - Public

1900180 - Even after changing the datasource of the report at runtime, report shows the data from the older datasource.

Symptom

  • Even after changing the datasource of the report at runtime, report shows the data from the older datasource.
  • Report works fine when the datasource is manually changed using SetDatasourceLocation from Crystal designer.

Environment

  • Visual Studio 2010
  • Crystal Reports developer version for Microsoft Visual Studio

Cause

 'Save data in the report' option is checked for the report in the designer.

Resolution

  • Open the report with Crystal Reports bundled designer inside Visual Studio.
  • Uncheck the 'Save data in the report' option for the report.
  • The option 'Save data in the report' is located at the top right corner when the report is previewed using 'Main report preview' option.

Untitled.jpg

  • Other option is to use CrReportDocument.Refresh() after CrReportDocument.Load().

Keywords

crvs cr4vs crforvs crvs2010 cr4vs2010 crforvs2010 , KBA , BI-DEV-NET-SDK , .NET SDK / COM SDK , Problem

Product

SAP Crystal Reports, developer version for Microsoft Visual Studio