Hi everybody.
I used to change the group sorting by code in VB6 and cystal reports XI using the GroupSortFields collection in this way:
Private Sub AplicarOrdenamientoGrupo(ByRef f_rep_Reporte As craxdrt.Report)
Dim l_i_Ordenamiento As Integer
Dim l_sfd_SummFieldDef As craxdrt.SummaryFieldDefinition
For l_i_Ordenamiento = 1 To f_i_OrdenamientoGrupo
Set l_sfd_SummFieldDef = f_rep_Reporte.SummaryFields.Item(ObtenerIndiceSummField(f_s_OrdenamientosGrupo(l_i_Ordenamiento).Agrupador, f_s_OrdenamientosGrupo(l_i_Ordenamiento).Columna, f_s_OrdenamientosGrupo(l_i_Ordenamiento).Operacion))
f_rep_Reporte.GroupSortFields.Add l_sfd_SummFieldDef, f_s_OrdenamientosGrupo(l_i_Ordenamiento).Direccion
Set l_sfd_SummFieldDef = Nothing
Next l_i_Ordenamiento
End Sub
ObtenerIndiceSummField: is a function wich returns the index of a summaryfield in the summaryfields collection
Now I'm using VS 2012 and SAP crystal reports 2013 and I can't find something similar. How can I achieve this behaviour? I used to let the user to select the sort order.
Regards.
Damian.