How to change the order of sort fields in a Crystal report at runtime using the Report Application Server .NET SDK.
- Visual Studio 2005 / Visual Studio 2008
- Crystal Reports 2008
1. Retrieve the ReportClientDocument object from the ReportDocument object.
ISCDReportClientDocument rcd = ReportDocument.ReportClientDocument;
2. The sort fields are present in the Sorts collection which should be accessed with the below line of code only.
3. Call the Move method wherein, as arguments, pass sort objects or indices of the objects in the Sorts collection as illustrated in the below line of code.
// Move 1st sort field to 2nd position in the Sorts collection.
KBA , BI-DEV-NET-SDK , .NET SDK / COM SDK , How To