SAP Knowledge Base Article - Public

1746303 - CrystalDecisions.ReportAppServer.ReportDefModel.ConditionFormula displayStringCondition - "Display String" formula returns null

Symptom

  • To modify the Display String formula of any report object using the .NET SDK always returns a null value for the formula text
  • Display String is located by right clicking on a report object -> Format Field -> Common tab and then click the X+2 button.

Environment

Crystal Reports for Visual Studio 2010 service pack 4

Reproducing the Issue

Simple application code to reproduce the issue:

CrystalDecisions.CrystalReports.Engine.ReportDocument rpt = new CrystalDecisions.CrystalReports.Engine.ReportDocument();
ISCDReportClientDocument rcd;
rpt.Load(Request.PhysicalApplicationPath + "Formulas.rpt");
rcd = rpt.ReportClientDocument;
CrystalDecisions.ReportAppServer.ReportDefModel.ReportObject rptObj;
rptObj = (CrystalDecisions.ReportAppServer.ReportDefModel.ReportObject) rcd.ReportDefController.ReportDefinition.FindObjectByName("Field7" );
// Note: Field7 is the name of the report object you see in the Common Tab
CrystalDecisions.ReportAppServer.ReportDefModel.ConditionFormula displayStringCondition;
displayStringCondition = rptObj.Format.ConditionFormulas [CrObjectFormatConditionFormulaTypeEnum.crObjectFormatConditionFormulaTypeDisplayString];
Response.Write(displayStringCondition.Text.ToString());

Cause

The issue has been tracked ADAPT01653799

Resolution

 The issue is resolved in Service Pack 5 for SAP Crystal Reports, developer version for Microsoft Visual Studio

Keywords

empty cr crvs cr4vs text , KBA , BI-DEV-NET , BI Software Development Kits (SDKs) - .NET or Other , Problem

Product

Crystal Reports 2008 V1 ; SAP Crystal Reports, developer version for Microsoft Visual Studio