Go Premium for a chance to win a PS4. Enter to Win

x
?
Solved

Sort display of one column by value of another

Posted on 2011-03-07
7
Medium Priority
?
731 Views
Last Modified: 2012-05-11
I have a very simple query that generates a list of agency names. I want to sort this list in alpha order showing first all those where external=true then those where external=false.

Can't seem to get a group expression to do it. Changed the .rsd and sorted there, didn't matter on the report side.

How do I get the list to show me the "falses" first?  RB view of .rdl
0
Comment
Question by:gberkeley
  • 4
  • 3
7 Comments
 

Author Comment

by:gberkeley
ID: 35059172
Here is the RB view of the report definition. SHows filelds to be sorted
0
 
LVL 37

Expert Comment

by:ValentinoV
ID: 35066657
Right-click the grey border of the table (in design view) and select Tablix Properties.  Then select the Sorting page.  In that page you should add two lines: the first one to sort on your External field, the second to sort on Agency.  That should result in your data being ordered first on External, then Agency.
0
 
LVL 37

Accepted Solution

by:
ValentinoV earned 2000 total points
ID: 35066753
My comment above was assuming that you're using a table, not a matrix.  Looking at your screenshot, it seems like you're using a matrix so you'll need to set up the sorting differently.

To get your "falses" in the first lines followed by the "trues", you should open the Group Properties by clicking the dropdown arrow for your Agency Row Group (below the report design there are two boxes called Row Groups and Column Groups.  In Row Groups there should be an item, open the properties of that item).

Then select the Sorting page and add your External field as first one to group on.  Agency will probably already be in the list.  After adding External, you can use the button with the up arrow to get it to first sort on External.

Hope that helps?
0
[Webinar] Cloud and Mobile-First Strategy

Maybe you’ve fully adopted the cloud since the beginning. Or maybe you started with on-prem resources but are pursuing a “cloud and mobile first” strategy. Getting to that end state has its challenges. Discover how to build out a 100% cloud and mobile IT strategy in this webinar.

 

Author Closing Comment

by:gberkeley
ID: 35068791
Terrific answer - you helped me figure out the missing piece of the puzzle! Thanks!
0
 
LVL 37

Expert Comment

by:ValentinoV
ID: 35072466
Glad I could help you out!  Thank you for getting me one step closer to the 500.000 points as required to become a Sage :-)
0
 

Author Comment

by:gberkeley
ID: 35183023
Valentino - I have a new question out there - please would you take a look? (Better yet, follow me!) I really appreciate your help.
0
 
LVL 37

Expert Comment

by:ValentinoV
ID: 35187130
Comment added :-)

(I can follow you if you like, but I never look at that, so it wouldn't make a difference...)
0

Featured Post

Vote for the Most Valuable Expert

It’s time to recognize experts that go above and beyond with helpful solutions and engagement on site. Choose from the top experts in the Hall of Fame or on the right rail of your favorite topic page. Look for the blue “Nominate” button on their profile to vote.

Question has a verified solution.

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

Introduction As you'll probably know, a data region in a SQL Server Reporting Services report can be linked to only one dataset.  This makes it troublesome when you need to display data from more than one dataset in the same data region.  SQL Serve…
Occasionally there is a need to clean table columns, especially if you have inherited legacy data. There are obviously many ways to accomplish that, including elaborate UPDATE queries with anywhere from one to numerous REPLACE functions (even within…
Video by: ITPro.TV
In this episode Don builds upon the troubleshooting techniques by demonstrating how to properly monitor a vSphere deployment to detect problems before they occur. He begins the show using tools found within the vSphere suite as ends the show demonst…
We’ve all felt that sense of false security before—locking down external access to a database or component and feeling like we’ve done all we need to do to secure company data. But that feeling is fleeting. Attacks these days can happen in many w…

971 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