|
-
Mar 2nd, 2004, 12:47 PM
#1
Thread Starter
Lively Member
** Resolved ** Sorting Columns Descending or Ascending
Hello,
I'm using Crystal Reports.NET.
I have 2 questions:
1) Is there anyway to sort a column by descending or ascending order by clicking on the column header?
2) I have a datetime field in SQL Server, but when I made the report in the designer, the years are not sorted correctly.
It's sorted like this:
1/2/2003
5/24/2001
7/3/1999
Is there a way to sort by year, not by the month?
Thanks for any solutions on either of these questions
Chris
Last edited by Trancedified; Mar 3rd, 2004 at 12:04 PM.
-
Mar 2nd, 2004, 01:27 PM
#2
PowerPoster
I have done the date theng also. I created a formula equal to datepart("yyyy",data field) and made it not visible. The I sort on that field.
-
Mar 2nd, 2004, 02:35 PM
#3
Thread Starter
Lively Member
Pasvorto,
Can you please elaborate on how to create this field? I am new to Crystal Reports.
Thanks
Chris
-
Mar 3rd, 2004, 08:59 AM
#4
Hyperactive Member
I don't see any reason why CR would sort your date in that kind of a manner UNLESS your are converting your datetime field into a text string to remove the time part in your report.
What you should do is to create a formula based on your SQL datetime field and format this so that only the date will be shown then sort the report based on this formula.
EX.
(1) Create a formula "DateSort"
(2) Edit formula where "DateSort" = DATEVALUE({Table.DateField})
I'm using CR9 so I am not sure if DATEVALUE() function is available with your version. If it is, then this would be your best bet.
-
Mar 3rd, 2004, 12:06 PM
#5
Thread Starter
Lively Member
** Resolved **
Open the report
Right Click White Area Report OPTIONS....
Ensure Convert Date-Time Field is To Date
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|