Cannot set parameter default value
Hi, I'm using SSRS 2008 running off a SSAS 2008 cube. My report dataset is running the following query: SELECT { } ON COLUMNS, { ([Date].[Date Hierarchy - Calendar].[Date Calendar Month].ALLMEMBERS ) } DIMENSION PROPERTIES MEMBER_CAPTION, MEMBER_UNIQUE_NAME ON ROWS FROM ( SELECT ( STRTOSET(@DateDateHierarchyCalendar, CONSTRAINED) ) ON COLUMNS FROM [MyCube]) CELL PROPERTIES VALUE In the properties for the DateDateHierarchyCalendar parameter, I set the Available values to Get Value From Query, and this points to the following query: WITH MEMBER [Measures].[ParameterCaption] AS [Date].[Date Hierarchy - Calendar].CURRENTMEMBER.MEMBER_CAPTION MEMBER [Measures].[ParameterValue] AS [Date].[Date Hierarchy - Calendar].CURRENTMEMBER.UNIQUENAME MEMBER [Measures].[ParameterLevel] AS [Date].[Date Hierarchy - Calendar].CURRENTMEMBER.LEVEL.ORDINAL SELECT {[Measures].[ParameterCaption], [Measures].[ParameterValue], [Measures].[ParameterLevel]} ON COLUMNS , [Date].[Date Hierarchy - Calendar].ALLMEMBERS ON ROWS FROM [MyCube] The Value field is set to ParameterValue and the Label field is set to ParameterCaptionIndented. I then have a named set in SSAS called [Calendar Current Month] which looks like the following: TAIL (FILTER([Date].[Date Hierarchy - Calendar].[Date Calendar Month].MEMBERS, [Measures].[MyMeasure]<>0), 1) I then set the Default Value for the parameter to the following: [Calendar Current Month]. When I run the report, the parameter dropdown is populated correctly with the appropriate values, but the default value is not selected. Your help will be greatly appreciated. Thanks, Louis
September 28th, 2010 10:02am

Louis When you set the default parameter value, make sure that you use the fully-qualified member unique name and not just the visible value. Without digesting all your script and being familiar with your cube, I'm not sure what this is but it would be the member name you would get if you were to drag the member into the MDX query window from the metadata tree in SSMS. Hope this is helpfulPaul Turley, MVP [Hitachi Consulting] SQLServerBIBlog.com
Free Windows Admin Tool Kit Click here and download it now
September 28th, 2010 11:58am

Hi Paul, Thanks for your reply. The problem is that the default value is being calculated dynamically using a named set which looks like this: Tail (Filter([Date].[Date Hierarchy - Calendar].[Date Calendar Month].members, [Measures].[My Measure]<>0),1) The name of this named set is then my default parameter, i.e. [Calendar Current Month]. Following from your suggestion above, I will see if I can return the fully qualified name in the named set. Regards, Louis
September 28th, 2010 12:34pm

I see. I believe that the isue is the same and that you're on the right path to solving it.Paul Turley, MVP [Hitachi Consulting] SQLServerBIBlog.com
Free Windows Admin Tool Kit Click here and download it now
September 28th, 2010 12:36pm

Also, the default value has to match one of the values in the Value field, not the Label field. In this case, [Date].[Date Hierarchy - Calendar].CURRENTMEMBER.UNIQUENAME . If you run your [Calendar Current Month] named set does it return a value that looks EXACTLY like one of the values contained in ParameterValue field from your date query? If it returns a value that doesn't exist in ParameterValue then you won't get the default. It's not very intuitive but the value you use for the default has to match the parameter value, not the parameter label. So even if you've set up your default parameter to use the fully-qualified member unique name and not just the visible value as Paul suggests, the value still has to exist in your parameter dataset. In other words, if your date query returns dates for 2005 - 2009 and your default value is returning a date in 2010, then it won't show up. It has to already be included in your parameter dataset. Hope that what I'm trying to explain makes sense!
September 28th, 2010 5:40pm

This topic is archived. No further replies will be accepted.

Other recent topics Other recent topics