Crystal Reports ? Set Order By At runtime

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

I am looking for a way to set the Sort Order by at runtime

Sort the output of field "totalfees" to (descending) or (ascending) at
runtime.

Thanks

BrianDH
 
This works
Dim crSortDirection As SortDirection
Dim crDatabaseFieldDefinition As DatabaseFieldDefinition
Dim crSortField As SortField
Dim iSortItem As Integer = 0

crDatabaseFieldDefinition =
crReportDocument.Database.Tables(0).Fields(6)
crSortField = crReportDocument.DataDefinition.SortFields(0)
crSortField.Field = crDatabaseFieldDefinition
'crSortField.SortDirection = SortDirection.AscendingOrder
crSortField.SortDirection = SortDirection.DescendingOrder
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top