Click here to monitor SSC
SQLServerCentral is supported by Red Gate Software Ltd.
 
Log in  ::  Register  ::  Not logged in
 
 
 
        
Home       Members    Calendar    Who's On


Add to briefcase

SSRS. Parameters mdx script doesn't work with multi-value Expand / Collapse
Author
Message
Posted Sunday, March 3, 2013 2:03 AM
Valued Member

Valued MemberValued MemberValued MemberValued MemberValued MemberValued MemberValued MemberValued Member

Group: General Forum Members
Last Login: Wednesday, August 20, 2014 12:13 PM
Points: 69, Visits: 289

Hi ALL,

I need your your help!!

I want to create a report with multi-value parameters with SSRS.

So, I wrote this mdx script:

WITH
-- Geography metadata

MEMBER [Measures].[Geographie]
AS StrToValue ( @SelectionGeographie + ".Hierarchy.Currentmember.Uniquename" )
MEMBER [Measures].[Geographie_Label]
AS StrToValue( @SelectionGeographie + ".Hierarchy.CurrentMember.Member_Caption" )

-- Activity metadata

MEMBER [Measures].[Activite]
AS StrToValue( @SelectionActivite + ".Hierarchy.Currentmember.Uniquename" )
MEMBER [Measures].[Activite_Label]
AS StrToValue( @SelectionActivite + ".Hierarchy.CurrentMember.Member_Caption" )

-- Date metadata

MEMBER [Measures].[Temps]
AS StrToValue( @Annee + ".Hierarchy.Currentmember.Uniquename" )
MEMBER [Measures].[Temps_Label]
AS StrToValue( @Annee + ".Hierarchy.CurrentMember.Member_Caption" )

-- Perimetre metadata
MEMBER [Measures].[Perimetre]
AS StrToValue( @Perimetre + ".Hierarchy.Currentmember.Uniquename" )
MEMBER [Measures].[Perimetre_Label]
AS StrToValue( @Perimetre + ".Hierarchy.CurrentMember.Member_Caption" )


SELECT NON EMPTY {
-- display the parameters attributes on columns

[Measures].[Geographie],
[Measures].[Geographie_Label],


[Measures].[Activite],
[Measures].[Activite_Label],

[Measures].[Temps],
[Measures].[Temps_Label],

[Measures].[Perimetre],
[Measures].[Perimetre_Label],


[Measures].[11 VA]


} ON COLUMNS,

( STRTOSET ( "{" + @SelectionGeographie + "}") ,


STRTOSET ("{" + @SelectionActivite + "}" ))


ON ROWS

FROM [MyCube]

WHERE STRTOTUPLE ( "(" +@Annee + "," + @Perimetre + ")" )

But It works with one value in parameter and not with muti-value parameters.
I have null result in my metadata members when I have multi value.

Any idea ?

Thank
Post #1425928
Posted Sunday, March 3, 2013 3:34 AM
Valued Member

Valued MemberValued MemberValued MemberValued MemberValued MemberValued MemberValued MemberValued Member

Group: General Forum Members
Last Login: Wednesday, August 20, 2014 12:13 PM
Points: 69, Visits: 289
Noone ? : (
I don't know why That works when I have only one parameter and not with many parameters ? is it possible to use the uniquename functions with muti-value ?
Post #1425930
Posted Sunday, March 3, 2013 7:40 PM


SSC-Insane

SSC-InsaneSSC-InsaneSSC-InsaneSSC-InsaneSSC-InsaneSSC-InsaneSSC-InsaneSSC-InsaneSSC-InsaneSSC-InsaneSSC-Insane

Group: General Forum Members
Last Login: Today @ 5:05 PM
Points: 20,738, Visits: 32,520
Could be the fact that you double posted, or just that no one has an answer for you. I know I don't.

Please post any further responses here.



Lynn Pettis

For better assistance in answering your questions, click here
For tips to get better help with Performance Problems, click here
For Running Totals and its variations, click here or when working with partitioned tables
For more about Tally Tables, click here
For more about Cross Tabs and Pivots, click here and here
Managing Transaction Logs

SQL Musings from the Desert Fountain Valley SQL (My Mirror Blog)
Post #1426060
Posted Sunday, March 3, 2013 9:55 PM
Valued Member

Valued MemberValued MemberValued MemberValued MemberValued MemberValued MemberValued MemberValued Member

Group: General Forum Members
Last Login: Wednesday, August 20, 2014 12:13 PM
Points: 69, Visits: 289
yes. sorry
Post #1426078
« Prev Topic | Next Topic »

Add to briefcase

Permissions Expand / Collapse