1197610 - Error: "ErrorCode=-2147213284" when setting crosstab top and left coordinates in .NET 2005

SAP Knowledge Base Article - Public

1197610 - Error: "ErrorCode=-2147213284" when setting crosstab top and left coordinates in .NET 2005

Symptom

A Crystal report with crosstab objects is run in a Microsoft Visual Studio .NET 2005 application. When setting the top and left coordinates for the crosstab object programmatically, the following error appears:

  "System.Runtime.InteropServices.COMException was unhandled
  ErrorCode=-2147213284
  Message="Adding or changing this kind of report object is not supported."
  Source="RptControllers.dll"
  StackTrace: at CrystalDecisions.ReportAppServer.Cont"

  

The following code was used to set the top and left coordinates of the crosstab object:

Dim rpt As New CrossTab      
        For Each rptobj In rpt.ReportDefinition.ReportObjects
            ' crosstab object are not allowed to set location
            If rptobj.Kind = CrystalDecisions.Shared.ReportObjectKind.CrossTabObject Then
                Dim ct As CrossTabObject
                ct = CType(rptobj, CrossTabObject)
                ct.Left = 20
                ct.Top = 170
                ct.Border.BottomLineStyle = CrystalDecisions.Shared.LineStyle.DashLine
                MessageBox.Show(rptobj.Name & ";" & rptobj.Left & ";" & rptobj.Top)
            End If
            ' Chart object are allowed to set location
            If rptobj.Kind = CrystalDecisions.Shared.ReportObjectKind.ChartObject Then
                Dim ct As ChartObject
                ct = CType(rptobj, ChartObject)
                ct.Left = 120
                ct.Top = 10
                ct.Border.BottomLineStyle = CrystalDecisions.Shared.LineStyle.DashLine
                MessageBox.Show(rptobj.Name & ";" & rptobj.Left & ";" & rptobj.Top)
            End If
        Next

Cause

This is a known issue with Crystal Reports XI. This issue has been assigned Track ID ADAPT00760511.

Resolution

The issue is resolved in Fix Pack 2.5. Fix Pack 2.5.

Keywords

coordinates 2147213284 cross tab top left crosstab , 3601483 , KBA , BI-RA-CR , Crystal Reports designer or BusinessViews Manager , Bug Filed

Product

SAP Crystal Reports XI ; SAP Crystal Reports XI R2