Quantcast
Viewing latest article 14
Browse Latest Browse All 86

Sorting Parameter values in SSRS Model based report

This works for SSRS 2008, i have no clue if this would work in 2005.

I have some info that explains the behaviour of the Report Model query designer a bit, and how to sort your values.

If you want to sort on your customer name, make sure the custoner name field comes BEFORE the customer code, or any of the other fields from that same entity. SSRS will sort the fields in an entity by the first field it finds. so if you have the code first, it will sort by the code.
Sometime you want the field in the same Entity group, an entity group is when you see like an umbrella like title over the different fields that belong to the same entity. Sometimes you dont want this. When excactly you do want this or not i am not sure of. When I tried it just now with EmployeeID and EmpolyeeName i didnt get it to work with the in the same entity group. When I had the seperated and the EmployeeName first it sorted nicely by EmployeeName. Try it out and use the execute button and see what you get. If the results are in Name order, the parameter should also give you the values in that order.
I'm not quite sure if the Entitygrouping, I don't this it does. but the enrity grouping is something you probably want to use in your datasets, it saves performance as it will only look at that entity once instead of 5 times if you ahve the fields spread across the query.

When you create your dataset for your parameters you can manipulate the sorting of the values a bit. If you have for example a Profession and a Profession code, you want to make sure they are in the same entity group, easiest way to do this is to do select the 2 fields in your fields list and then drag them at the same time to your dataset area. They will then stick together and form a entity group. The first field in that group is the field that group will sort on. so if you want to sort on the profession name, make sure the Profession field is the leftmost field. If you want to sort on the code, make sure the code is the leftmost field.

There is very little info known about the Report Model query designer and we figured some things out after trying a few things. The way that screen works is also very weird are not very consistent. The way i described got us to sort the parameter values just the way we wanted.

This isn't a perfect answer but i found it to work for us, and since there is hardly anything known about this i thought i'd share it. I have searched about this a lot as well and couldn't find anything.

So I hope it helps.


Viewing latest article 14
Browse Latest Browse All 86

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>