home
training courses
why choose us?
solutions
support
company
LearnItFirst User Forum
Welcome Guest
Search
|
New Posts
|
Members
|
Log In
|
Register
SQL Server Forum - LearnItFirst.com
»
SQL Server Scripts, Code Samples and SSMS Custom Reports
»
SQL Server Management Studio Custom Reports
»
Sort order of NULL values in report
Sort order of NULL values in report
Options
Previous Topic
·
Next Topic
jsaling
Posted:
Thursday, July 23, 2009 11:11:50 AM
Rank: Newbie
Joined: 7/23/2009
Posts: 2
Points: 6
Where do you live?: MA, USA
I have a date field in a SQL Server Report created in MS Visual Studio and being run against what I believe is a SQL 2000 server.
The database is remote and I only have access to the Report Manager server to upload and run reports. The report xmlns has to be changed from ../2005/01/reportdefinition to ../2003/10/reportdefinition before it will run.
The date field has some NULL values.
I am trying to sort ascending but the NULL values come first.
How do I get the NULL values to come last in the sort?
I have been all over google and bing and must not be searching on the right phrase, because I've been able to find nothing that helps (except this forum!)
Thank you.
Joe S
Back to top
jsaling
Posted:
Friday, July 24, 2009 9:09:26 AM
Rank: Newbie
Joined: 7/23/2009
Posts: 2
Points: 6
Where do you live?: MA, USA
Oddly it would seem asking the question helped me better formulate a search.
I found a result that works!
In the Table Properties Sorting tab, I used the expression:
=iif(isnothing(Fields!Lock_Expire.Value),1,0)
I read this as NULL values = 1, anything else = 0. Sort starting with the 0s followed by the 1s
Back to top
Scott Whigham
Posted:
Sunday, July 26, 2009 5:46:29 AM
Rank: Super Mod
Joined: 3/20/2006
Posts: 466
Points: 1,020
Where do you live?: Dallas, TX
Awesome - thanks for posting the answer
Back to top
Users browsing this topic
Guest
Forum Jump
SQL Server Database Administration
- General SQL Database Question & Answer
- Backup, Recovery and Disaster Recovery
- SQL Server Security
- Integration Services (SSIS) and DTS
Transact-SQL Programming
- DML (SELECT, INSERT, UPDATE, DELETE) Questions
- Stored Procedures, Triggers, & Functions
SQL Server Scripts, Code Samples and SSMS Custom Reports
- All SQL Server Versions
- SQL Server 2005/2008
- SQL Server Management Studio Custom Reports
Customer Service
- Video Requests
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.
SQL Server 2005 DBA Training Videos
SQL Server 2008 DBA Training Videos
Email this topic
RSS Feed
Watch this topic
Print this topic
Normal
Threaded