Report Design
 Crystal Reports Forum : Crystal Reports for Visual Studio 2005 and Newer : Report Design
Message Icon Topic: SortDirection not working Post Reply Post New Topic
Author Message
mc_tiger
Newbie
Newbie


Joined: 24 Oct 2008
Location: United States
Online Status: Offline
Posts: 4
Quote mc_tiger Replybullet Topic: SortDirection not working
    Posted: 24 Oct 2008 at 12:48pm
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.
IP IP Logged
mc_tiger
Newbie
Newbie


Joined: 24 Oct 2008
Location: United States
Online Status: Offline
Posts: 4
Quote mc_tiger Replybullet Posted: 27 Oct 2008 at 6:08am
bump
IP IP Logged
BernieHunt
Newbie
Newbie


Joined: 03 Apr 2007
Location: United States
Online Status: Offline
Posts: 21
Quote BernieHunt Replybullet Posted: 09 Nov 2008 at 7:14pm
I don't know the answer to your method, but you may want to sort the records before you give them to Crystal. It will operate much quicker and you'll have much better sorting control without having to worry about the Crystal syntax.
 
Bernie
 
IP IP Logged
Post Reply Post New Topic
Printable version Printable version

Forum Jump
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot delete your posts in this forum
You cannot edit your posts in this forum
You cannot create polls in this forum
You cannot vote in polls in this forum



This page was generated in 0.031 seconds.