?
Solved

Sorting by DATE and TIME in Visual Studio Reporting (SSRS)

Posted on 2014-04-22
4
Medium Priority
?
2,330 Views
Last Modified: 2014-05-15
I have a report that has field called START_TIME. This field is a date field. When I run the ORDER BY in the query it is correct. When I run the report using PREVIEW that date is not sorted. How do I sort the date show it displays in my report correctly?
0
Comment
Question by:allenkent
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
4 Comments
 
LVL 66

Expert Comment

by:Jim Horn
ID: 40016338
>When I run the report using PREVIEW that date is not sorted

1.

Check your matrix/tablix's Row Groups properties, then Sorting, and see if the report is sorting at all, which will override the query's sort order.

2.

Make sure the Data Set shows that column as a datetime, and not text.
0
 

Author Comment

by:allenkent
ID: 40016367
1) I have checked and add START_DATE to my tablix and it does not work. No sorting in tablix seems to work

2) My table shows as DATETIME field. Why would the data set change value? How?
0
 
LVL 49

Expert Comment

by:PortletPaul
ID: 40016398
are you applying a format to that datetime field in the query?

e.g.
convert(varchar, START_DATE ,111)
0
 
LVL 21

Accepted Solution

by:
Alpesh Patel earned 2000 total points
ID: 40019981
Please check Matrix Sort order.

Select Matrix=> Property=> Soring Tab=> Select Starte_DAte Column.
0

Featured Post

Get MySQL database support online, now!

At Percona’s web store you can order your MySQL database support needs in minutes. No hassles, no fuss, just pick and click. Pay online with a credit card.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Why is this different from all of the other step by step guides?  Because I make a living as a DBA and not as a writer and I lived through this experience. Defining the name: When I talk to people they say different names on this subject stuff l…
In the first part of this tutorial we will cover the prerequisites for installing SQL Server vNext on Linux.
Via a live example, show how to extract insert data into a SQL Server database table using the Import/Export option and Bulk Insert.
Using examples as well as descriptions, and references to Books Online, show the documentation available for datatypes, explain the available data types and show how data can be passed into and out of variables.
Suggested Courses

777 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question