Solved

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

Posted on 2014-04-22
4
1,938 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
4 Comments
 
LVL 65

Expert Comment

by:Jim Horn
Comment Utility
>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
Comment Utility
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 48

Expert Comment

by:PortletPaul
Comment Utility
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 500 total points
Comment Utility
Please check Matrix Sort order.

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

Featured Post

Do You Know the 4 Main Threat Actor Types?

Do you know the main threat actor types? Most attackers fall into one of four categories, each with their own favored tactics, techniques, and procedures.

Join & Write a Comment

In this article—a derivative of my DaytaBase.org blog post (http://daytabase.org/2011/06/18/what-week-is-it/)—I will explore a few different perspectives on which week today's date falls within using Microsoft SQL Server. First, to frame this stu…
I wrote this interesting script that really help me find jobs or procedures when working in a huge environment. I could I have written it as a Procedure but then I would have to have it on each machine or have a link to a server-related search that …
Familiarize people with the process of retrieving data from SQL Server using an Access pass-thru query. Microsoft Access is a very powerful client/server development tool. One of the ways that you can retrieve data from a SQL Server is by using a pa…
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.

772 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

Need Help in Real-Time?

Connect with top rated Experts

12 Experts available now in Live!

Get 1:1 Help Now