Invalid field number returned after changing grouping/sorting through SDK
We have a Crystal Report version 2008 with 2 Group fields defined and 3 other Sort fields. Our application uses the SDK to overwrite the grouping and sorting in the report. The application will remove all sort and group fields (using ReportAppServer.Controllers.SortController.Remove) then add back in any sorts or groups that the user wants to use.
The operations to remove and add the sort and group fields works correctly. However, when CrystalReports.Engine.Table.ApplyLogOnInfo is called later, it fails with Invalid Field Number. This does work if the first field added back in was one of the group fields; if a different field is added first, then I receive this error.
This code worked correctly when running version 12 of the CrystalReports.Engine; it now fails since going to version 13. I attempted to apply the most recent service pack and am still receiving the error, but when calling a different API.
Are there any known issues with overriding the report grouping, particularly with version 13 of the runtime engine?
Thank you for any insight.