all groups > sql server reporting services > february 2007 >
You're in the

sql server reporting services

group:

Allow users to select their own sorting


Allow users to select their own sorting armela
2/13/2007 10:38:01 AM
sql server reporting services:
Here is my question.

Sorting and grouping question by allowing users to select the sorting field



I have a report where I am giving the users a parameter so that they can
select which field they would like to sort on.The report is also grouping by
that field. I have a gruping section, where i have added code to group on the
field I want based on this parameter, however I also would like to change the
sorting order but I checked around and I did not find any info.

So here is my example. I am showing sales order info.The user can sort and
group by SalesPerson or Customer. Right now, I have code on my dataset to
sort by SalesPerson Code and Order No. So far the grouping works, however the
sorting does not.
So when the users selects SalesPerson from the report parameter, it will
sort by salesPerson and group by each salesperson, and when they select
Customer, it should group and sort by customer. The grouping section already
works, but I can not figure out where to change the sorting rule.



Any suggestions would help.






RE: Allow users to select their own sorting adolf garlic
2/14/2007 2:53:07 AM
which version of reporting services are you using?

if you are using 2005 then sorting is built in to the front end
see 'interactive sorting' at
ms-help://MS.VSCC.v80/MS.MSDN.v80/MS.SQL.v2005.en/rptsrvr9/html/7eb8dcef-d152-470d-b440-3aaa2c26fb56.htm



[quoted text, click to view]
RE: Allow users to select their own sorting armela
2/14/2007 6:30:35 AM
Hi there.
I am using SQL 2005 SP1. I tried to access the website you referred to, but
that did not take me anywhere.
Can you give me website address again ??
Thanks

[quoted text, click to view]
RE: Allow users to select their own sorting armela
2/14/2007 8:59:10 AM
Maybe you misunderstood my question
I have a paramenter on the option's screen called sorting option and the
user selects how they want to sort. Based on that paramenter,I am also
groupting data.
I have code on the Table group header for the grouping and that works fine,
however I do not know where to add code to sort the table based on the
Sorting paramenter.
Anyone have any ideas ??

Thanks

[quoted text, click to view]
RE: Allow users to select their own sorting Amarnath
2/14/2007 9:56:00 PM
What I have understood, correct me if I am wrong.

You have grouping in your table which you have already given code for
grouping and when it groups as per the given column name, it has to be sorted
may be asc or desc order.

If you are grouping on a table column, the same table column should be
selected in the sorting tab of the table from the drop down.

correct me if I have understood wrongly.

Amarnath

[quoted text, click to view]
RE: Allow users to select their own sorting armela
2/15/2007 7:23:18 AM
I figured this out.
It is in group properties, sorting tab.
that is where I added code to sort by the fields I needed by using the IIF
statement and checking the paramenter values.

THanks

[quoted text, click to view]
AddThis Social Bookmark Button