I'm using VB.Net 2010 with Crystal Reports for VS SP5 (inproc-RAS).
For Each field As CrystalDecisions.ReportAppServer.DataDefModel.Field In MainReport.ReportClientDocument.DataDefController.DataDefinition.FormulaFields If field.Name = mysortField Then Dim newRasSortField As New CrystalDecisions.ReportAppServer.DataDefModel.Sort With newRasSortField .SortField = field .Direction = CrSortDirectionEnum.crSortDirectionAscendingOrder End With MainReport.ReportClientDocument.DataDefController.SortController.Add(-1, newRasSortField)
The formula exists in the report, but the last line throws an exception "Sorting not possible on this field" (Error -2147213300).
I have no problems adding sort-field from tables.
Any ideas?
BW. where have all your KB-articles gone?
Patrick