1811884 - InProc RAS SDK does not return Group Sorts if "No Sort" is set in the Sort Collection

SAP Knowledge Base Article - Public

1811884 - InProc RAS SDK does not return Group Sorts if "No Sort" is set in the Sort Collection

Symptom

  • Running a report in a Visual Studio .NET application
  • Report has  "No Sort" set in the Sort Collection
  • The Crystal Reports Designer may also terminate unexpectedly on Windows XP and Windows Server 2003

Environment

  • SAP Crystal Reports 2008
  • Crystal Reports for Visual Studio 2010
  • Visual Studio 2010

 

Reproducing the Issue

  1. Create a report
  2. Set the Group Sorts to "No Sort" in the Sort Collection
  3. Use the following Sorts collection code: 
    btnReportObjects.Text = "";
    foreach (CrystalDecisions.ReportAppServer.DataDefModel.Sort RASSortField in rptClientDoc.DataDefController.DataDefinition.Sorts)
    {
         foreach (SortField crSortField in rpt.DataDefinition.SortFields)
         {
               if (RASSortField.SortField.FormulaForm == crSortField.Field.FormulaName)
               {
                   if (crSortField.SortType.ToString() == SortFieldType.GroupSortField.ToString())
                   {
                         textBox1 = "Group Sort:\n ";
                   }
                         else
                              textBox1 = "Record Sort:\n ";
                              textBox1 += crSortField.Field.Name.ToString();
                                    textBox1 += "  ";
                 }
          }
                    textBox1 += RASSortField.SortField.FormulaForm.ToString() + "\n";
                    textBox1 += "  ";
                    textBox1 += RASSortField.Direction.ToString() + "\n";
                    btnReportObjects.Text += textBox1;
                    btnReportObjects.AppendText("\n");
    }
    break;
 

Resolution

Issue has been tracked  ADAPT01614097 and resolved in Service Pack 5

Keywords

CR2010 2010 CR4VS2010 CR4VS VS2010 NET2010 Crystal Reports for .NET Framework 4.0 crforvs 13 2012 sorting , KBA , BI-DEV-NET-SDK , .NET SDK / COM SDK , Problem

Product

SAP Crystal Reports 2001 V1