Skip to Content
Former Member
Sep 19, 2008 at 02:16 PM

defining sort criteria using vb6 and CR XI


using vb6 and cr XI and I am trying to provide the user with the capability of defining sort options using options defined on a VB6 form. The sample code I've found as described below doesn't seem to allow me to change the sort criteria by field name

'General Declarations

Dim CRXDatabaseField As CRAXDRT.DatabaseFieldDefinition

Private Sub Form_Load()

Set CRXDatabaseField = CRXReport.Database.Tables.Item(1).Fields.Item(8)

CRXReport.RecordSortFields.Item(1).Field = CRXDatabaseField

I would like the user to select an option to sort by say Client and then provide this information to the report like I could with CR 7 as follows

crReport.SortFields(0) = "+{Horse.Location}"

Thanks for any help