cancel
Showing results for 
Search instead for 
Did you mean: 

GroupSortFields in crystal reports 2013

Former Member
0 Kudos

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.

Accepted Solutions (1)

Accepted Solutions (1)

0 Kudos

First thing to do is download the .NET SDK for VS 2012, it no longer comes with or gets installed with CR Designer:

First link to integrate into VS, all others are only for redist.

Group sorting is a pain to use actually. See if this test app gets the info for you:

On the right there is a drop down function to get sorts... have a look at the code.

You can change the sort but if you want no sort then you need to remove all sorts and refresh the page...

Don

Answers (0)