I have a drill down report defined based on groups in design time.

I use the following code for sorting at run time:

crReportDocument.DataDefinition.SortFields.Item(0) .Field = FieldDef

Catch ex As Exception

We have defined a combobox, populating the fields that can be used for sorting. Once the user chooses a field and clicks on a button defined for Sort, then the above code sorts the report.

This code works for the first level, when we drill thru to the second level (ie into the secod group), this does not work. Also we face the similar problem in sorting when we use subreports. Sorting works on the main report, but not on the subreport.

In essence we would like to specify that we want to sort on a particular group inthe report.

Can anyone help in this regard?