SAP Knowledge Base Article - Public

1558036 - Error: "The summary data field of group chart does not exist." When changing the title of a chart using the RAS .NET SDK

Symptom

  • Modify/change the title of a chart title using the RAS .NET SDK.
  • An exception is thrown:
System.Runtime.InteropServices.COMException was unhandled by user code
   Message="The summary data field of group chart does not exist."
   Source="rptcontrollers.dll"
   ErrorCode=-2147213287
   StackTrace:
        at CrystalDecisions.ReportAppServer.Controllers.ReportObjectControllerClass.Modify(ISCRReportObject OldObject, ISCRReportObject NewObject)
        at _124754_Modify_Chart_Title.FormViewReport.ModifyChartTitle(ISCDReportClientDocument boReportClientDocument, ChartObject boChartObject, String newChartTitle) in C:\Documents and Settings\Administrator\My Documents\Visual Studio 2008\Projects\124754_Modify_Chart-Title\124754_Modify_Chart-Title\FormViewReport.cs:line 59
        at _124754_Modify_Chart_Title.FormViewReport.ConfigureCrystalReports(String filename) in C:\Documents and Settings\Administrator\My Documents\Visual Studio 2008\Projects\124754_Modify_Chart-Title\124754_Modify_Chart-Title\FormViewReport.cs:line 44
        at _124754_Modify_Chart_Title.FormViewReport..ctor(String filename) in C:\Documents and Settings\Administrator\My Documents\Visual Studio 2008\Projects\124754_Modify_Chart-Title\124754_Modify_Chart-Title\FormViewReport.cs:line 23
        at _124754_Modify_Chart_Title.Form1.openFileDialog1_FileOk(Object sender, CancelEventArgs e) in C:\Documents and Settings\Administrator\My Documents\Visual Studio 2008\Projects\124754_Modify_Chart-Title\124754_Modify_Chart-Title\Form1.cs:line 27
        at System.Windows.Forms.FileDialog.OnFileOk(CancelEventArgs e)
        at System.Windows.Forms.FileDialog.DoFileOk(IntPtr lpOFN)
        at System.Windows.Forms.FileDialog.HookProc(IntPtr hWnd, Int32 msg, IntPtr wparam, IntPtr lparam)

Environment

  • Crystal Reports 2008, Service Pack 3
  • Visual Studio 2008
  • RAS .NET SDK

Reproducing the Issue

private void ModifyChartTitle(CrystalDecisions.ReportAppServer.ClientDoc.ISCDReportClientDocument boReportClientDocument, CrystalDecisions.ReportAppServer.ReportDefModel.ChartObject boChartObject, string newChartTitle)
{
CrystalDecisions.ReportAppServer.Controllers.ReportObjectController boReportObjectController = boReportClientDocument.ReportDefController.ReportObjectController;
CrystalDecisions.ReportAppServer.ReportDefModel.ChartObject boChartNew = (CrystalDecisions.ReportAppServer.ReportDefModel.ChartObject)boChartObject.Clone(true);

CrystalDecisions.ReportAppServer.ReportDefModel.ChartStyle boChartStyle = boChartNew.ChartStyle;
boChartStyle.TextOptions.Title = newChartTitle;  // Set the new chart title here
boReportObjectController.Modify(boChartObject, boChartNew);  // Exception is thrown on this line
return;
}

Cause

  • Using the Group Layout in the Chart Options causes this problem.

chart group layout.png

Resolution

  • Use the Advanced Layout to achieve the same chart results.

chart advanced layout.png

Keywords

KBA , BI-DEV-NET , BI Software Development Kits (SDKs) - .NET or Other , Bug Filed

Product

Crystal Reports 2008 V1