Wednesday, March 28, 2012

Grouping order conditionally?!

Hi,
I have a matrix with some groups and data.
I am passing a parameter called "theSort" to the report which is either "T"
or "C"
Two groups are TITLE and COUNTRY
If "T" is passed I would like the matrix to put TITLE first (in the first
column in matrix) and then COUNTRY after it. If "C" is passed then vice versa.
Is this possible' It didn't seem to work when I tried the following:
In the matrix's group tab, I put expressions for each group like so...
For Title group i put:
=IIF(Parameters!theSort Is "T",Fields!Title.Value,Fields!Country.Value)
For Country group i did:
=IIF(Parameters!theSort Is "T",Fields!Country.Value,Fields!Title.Value)
Didnt work.
Any help appreciated.
regards
KSTry =IIF(Parameters!theSort.Value ="T",Fields!Title.Value,Fields!Country.Value)
Fang Wang (MSFT)
Microsoft SQL Server Reporting Services
This posting is provided "AS IS" with no warranties, and confers no rights.
"saleek" <saleek@.discussions.microsoft.com> wrote in message
news:7787C07F-EF50-4E21-83C8-EA2E37DF3531@.microsoft.com...
> Hi,
> I have a matrix with some groups and data.
> I am passing a parameter called "theSort" to the report which is either
"T"
> or "C"
> Two groups are TITLE and COUNTRY
> If "T" is passed I would like the matrix to put TITLE first (in the first
> column in matrix) and then COUNTRY after it. If "C" is passed then vice
versa.
> Is this possible' It didn't seem to work when I tried the following:
> In the matrix's group tab, I put expressions for each group like so...
>
> For Title group i put:
> =IIF(Parameters!theSort Is "T",Fields!Title.Value,Fields!Country.Value)
> For Country group i did:
> =IIF(Parameters!theSort Is "T",Fields!Country.Value,Fields!Title.Value)
> Didnt work.
> Any help appreciated.
> regards
> KS

No comments:

Post a Comment