Ok I am using Crystal report X and asp.net 2008.
I need to dynamically select a sort criteria from the asp page based on the user input. So I created two formulas(order_by1, order_by2). I then set these fields in the Record Sort Expert.
In the .Net code, I am able to set the formula for order_by1 and order_by2 to a certain field that the report should be sorted on. This works fine.
If I try and change the SortDirection on the SortField I get an error "Cannot change the sorting field of a sort object."
If I hardcode the sort values in the Record Sort Expert then I am able to set the SortDirection in code, but can't change the field names of the sort fields.
So what am I doing wrong?
Thanks.