Thursday, February 16, 2012

Allow users to select their own sorting

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.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
"armela" wrote:
> 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.
>
>
>
>|||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
"adolf garlic" wrote:
> 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
>
> "armela" wrote:
> > 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.
> >
> >
> >
> >
> >
> >
> >|||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
"armela" wrote:
> 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
> "adolf garlic" wrote:
> > 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
> >
> >
> >
> > "armela" wrote:
> >
> > > 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.
> > >
> > >
> > >
> > >
> > >
> > >
> > >|||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
"armela" wrote:
> 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
> "armela" wrote:
> > 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
> >
> > "adolf garlic" wrote:
> >
> > > 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
> > >
> > >
> > >
> > > "armela" wrote:
> > >
> > > > 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.
> > > >
> > > >
> > > >
> > > >
> > > >
> > > >
> > > >|||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
"Amarnath" wrote:
> 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
> "armela" wrote:
> > 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
> >
> > "armela" wrote:
> >
> > > 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
> > >
> > > "adolf garlic" wrote:
> > >
> > > > 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
> > > >
> > > >
> > > >
> > > > "armela" wrote:
> > > >
> > > > > 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.
> > > > >
> > > > >
> > > > >
> > > > >
> > > > >
> > > > >
> > > > >

No comments:

Post a Comment