Reputation: 59
I'm facing a known problem with default values for a cascading parameters. Since my parameters are coded in MDX I cannot find any specifc idea for a workaround.
Rather than trying to change a parameter query, I thought to check if there is a possibility of hard coding SELECT ALL for a cascading, or any parameter for that matter.
This is my Parameter dataset:
WITH
MEMBER [Measures].[ParameterValue] AS [Organisation].[Cost Centre Code and Description].CURRENTMEMBER.UNIQUENAME
SELECT
[Measures].[ParameterValue]
ON COLUMNS ,
[Organisation].[Cost Centre Code and Description].[Cost Centre Code and Description].ALLMEMBERS ON ROWS
FROM
(SELECT STRTOSET(@CC_Caption, CONSTRAINED) ON COLUMNS FROM
[CUBE] )
Would anyone have an idea how to hardcode SELECT ALL
for an SSRS parameter?
Thanks for any points :)
Upvotes: 0
Views: 1337
Reputation: 2642
It can be done in Custom Code. Not straightforward though. I have used in when using SharePoint list as a source. Should be applicable here. I will use a sample "Client" parameter.
The custom cod you need is below. You can perhaps change it to meet your need if you don't need to remove dups.
Public Shared Function RemoveDups(ByVal items As String) As String Dim noDups As New System.Collections.ArrayList() Dim SpStr as String() SpStr = Split(items ,"|") For i As Integer=0 To Ubound(Spstr) If Not noDups.Contains(SpStr(i).Replace("&","&").Trim()) Then noDups.Add(SpStr(i).Replace("&","&").Trim()) End If Next Dim uniqueItems As String() = New String(noDups.Count-1){} noDups.CopyTo(uniqueItems) uniqueItems.Sort(uniqueItems) Dim strRetValue AS String = String.Join("|", uniqueItems) strRetValue = "All|" + strRetValue Return strRetValue End Function
Now you will still need to have the filters and logic in place in your dataset queries that do the cascading...but this gives you the "ALL" option.
Upvotes: 1
Reputation: 919
Can you not go to default values for the parameter and use "Get values from a query" and then supply a query that has all of the values?
Upvotes: 0