Skip to Content

Archived discussions are read-only. Learn more about SAP Q&A

Determining the Sort Direction for Groups

I am porting a simple application from the CR 11.5 COM object model to a VB.NET object model (either the ReportDocument or the ClientReportDocument model), and I need to be able to determine the sort direction for all groups in a report. Based on the ClientReportDocument object model, I can definitively determine the Groups that use a "Specifed" sort direction by looking at the GroupOptions, but I cannot definitely determine the sort direction for Groups that have sort direction set to anything other than "Specified". The main reason is that there does not appear to be a direct link between the Group object and the corresponding SortField that contains the sort direction (if the Group even has a SortField).

Is there a simple way I can definitively determine the sort direction for a Group using either the ReportDocument or the ReportClientDocument models? I can make an educated guess by looping through the SortFields, and checking to see if they are GroupSort fields, and then matching their sort field with the specified field in the Group object, but this will be error prone. Is there a direct way to get the sort direction for a Group?

Thanks

Kevin

Not what you were looking for? View more on this topic or Ask a question