Okay, I'm at a loss, and hope that someone here can give me a hand with this problem.
I'm using CR 9.0 and am working on a report that needs dynamic sorting abilities.
I have created a parameter (?SortBy) with 4 choices
('Course Name', 'Course Number', 'Course Group', 'Course Duration').
Then I have made a group (@SortBy) that is as follows:
IF{?Sorted By}='Course Name' Then (Courses.CourseName}
Else
IF{?Sorted By}='Course Number'Then (Courses.CourseNumber}
Else
IF{?Sorted By}='Course Group'Then (Courses.CourseGroup)
Else
IF{?Sorted By}='Course Duration'Then (Courses.Duration)
Unfortunately, the Courses.Duration is a number field, so I get the error that a string is required whenever I try to compile it. I tried using TOTEXT(Courses.Duration), but by doing this it of course turns the number to text, and will not sort 1,2,3,4,5,6,7,8,9,10 but instead 1,10,100,2,21, etc. Anyone know how I can get around this?
Any help is much appreciated.
Thanks in advance,
KrystlDuk
I'm using CR 9.0 and am working on a report that needs dynamic sorting abilities.
I have created a parameter (?SortBy) with 4 choices
('Course Name', 'Course Number', 'Course Group', 'Course Duration').
Then I have made a group (@SortBy) that is as follows:
IF{?Sorted By}='Course Name' Then (Courses.CourseName}
Else
IF{?Sorted By}='Course Number'Then (Courses.CourseNumber}
Else
IF{?Sorted By}='Course Group'Then (Courses.CourseGroup)
Else
IF{?Sorted By}='Course Duration'Then (Courses.Duration)
Unfortunately, the Courses.Duration is a number field, so I get the error that a string is required whenever I try to compile it. I tried using TOTEXT(Courses.Duration), but by doing this it of course turns the number to text, and will not sort 1,2,3,4,5,6,7,8,9,10 but instead 1,10,100,2,21, etc. Anyone know how I can get around this?
Any help is much appreciated.
Thanks in advance,
KrystlDuk