[RESOLVED] Crystal Sort Order
Can anybody see why the following code doesn't work. VB.Net doesn't grumble but it doesn't run the report and promptly exits the program without any errors. If I comment out the code it works fine.
The report already has two sort fields but I just need to change the sort order.
VB Code:
Dim sField1 As CrystalDecisions.CrystalReports.Engine.DatabaseFieldDefinition
sField1 = x.cr.Database.Tables.Item(0).Fields("sales_order")
x.cr.DataDefinition.SortFields.Item(0).Field = sField1