Parameter Value - either ALLMEMBERS or a passed value
Hi all
I am doing a sub-report where I pass the paramters from the main report. I want to design the sub-report so that it doesn't have to use a query for its values; this will make it more efficient.
What I want to do is to have the parameter with two possibilities. If there is no "passed" value for the parameter I want it to default to "ALL" (or more correctly, ALLMEMBERS). On the other hand, if I pass a parameter from a main report, I want it to use
that value for the parameter.
Does anyone have any ideas on how I might do this?
Thanks
June 28th, 2011 12:22am
Hi Richard,
That is doable.
try something like this:-
= IIf ( IsNothing(Parameters!Para.Value), "ALLMEMBERS", Parameters!Para.Value )
Also note that, if ALLMEMBERS is selecting that you need to perform JOIN functions ( eg. Join ( Parameters!Para.Value, ',') )
Please let us know your feedback.
Thanks
KumarKG, MCTS
Free Windows Admin Tool Kit Click here and download it now
June 28th, 2011 12:36am
Hi Kumar
I get an error saying that the sytax for ALLMEMBERS is incorrect. Would you mind giving a bit more step-by-step detail on how you made this work?
Also I did not understand the comment on JOIN. What did you mean?
Thanks
June 28th, 2011 1:02am
Hi all
I worked on what Kumar suggested and so far I have a parameter with one available value - ALL. But if I pass any other value from a calling report, that value is not recognized. So it looks like I MUST have the query to fill the parameter, since it looks
like the report parameter first checks the passed parameter to see if it is in its list of values BEFORE passing it to the MDX select parameter.
Recall that my goal is to eliminate the query that provides the parameter value. So any other suggestions would be appreciated.
Thanks
Free Windows Admin Tool Kit Click here and download it now
June 28th, 2011 1:33am
Hi Richard,
If you are Writing a MDX then "ALLMEMBERS" will Not Work.
your Query should be passsed something like this :
[Product].[Category].[Allmembers]
http://msdn.microsoft.com/en-us/library/ms144768.aspxRakesh M J
Dont forget to mark it as Answered if found useful
MCTS,MCITP,MCSS
http://mycubeandreports.blogspot.com/
June 28th, 2011 6:45am
Hi all
I am being misunderstood here, so I will try again.
I have Report A which has a Go To for Report B. Report A passes a parameter to Report B. I would like to have that parameter accepted at Report B WITHOUT having to have a Dataset for the Parameter in Report B containing the value.
Here is as visual a look as I can get.
Report A >>> Report B
Drill-Through Parameter from Report A >>> Parameter!Report B
It looks like the parameter value provided by Report A must exist in the list of available values for Parameter!Report B. Unfortunately this means the report must have a Dataset for Parameter!Report B with all possible values. This is a performance
hit.
What I was wondering was if there was a way to pass the value to Parameter!Report B WITHOUT that value being in the Available Values list for Parameter!Report B. Alternatively is there a way to pass the value directly to the MDX parameter instead
of going through the intermediate step of the Report Parameter.
This intermediate step of hitting the Available Values list may be a way to confirm that the passed value is valid. After all, there are both security implications and performance implications. But it would be nice not to have to build that dataset.
Thanks
Richard
Free Windows Admin Tool Kit Click here and download it now
June 29th, 2011 11:22am
Hi Richard,
Based on the discussion above, you have a parameter in the Report B, and the Available Values of the parameter is specified by a dataset. Currently, if you don’t want the
dataset to be executed, I would suggest you specify the Available Values to “None” if possible. In this way, value from Report A can also be passed to Report B as parameter. However, if it cannot meet your requirement, please also point out.
Thanks,
Tony Chain
Forum Support
Please remember to mark the replies as answers if they help and unmark them if they provide no help. If you have feedback for TechNet Subscriber Support, contact
tnmff@microsoft.com.
June 30th, 2011 2:39am
Hi Tony
Brilliant! It never occurred to me that Available Values could be None while Default Values is ALL. This will really help my report performance.
Thanks
Richard
Free Windows Admin Tool Kit Click here and download it now
June 30th, 2011 11:28am
Hi Tony
Just to be certain I understand, this approach still requires that the dataset be in place, but it will not execute the dataset. For example, if I set the Available Values to None, can I delete the underlying dataset?
I am going to experiment with this approach, but any feedback you might provide would be useful.
Thanks
Richard
June 30th, 2011 11:39am
Hi Tony
I tried your idea and I deleted all those datasets. Works like a charm!
Thanks
Richard
Free Windows Admin Tool Kit Click here and download it now
June 30th, 2011 11:47am