Friday, March 23, 2012

RS2005 MDX report parameters

With a report is created against a cube, the data designer generates
the mdx. If a field is checked as a parameter, the mdx will include
something like this:
SELECT ( STRTOSET(@.ProductDimCatgLabel, CONSTRAINED)
As a default when the report is run, a dropdown presents all possible
values.
Behind the scenes, RS takes the friendly value presented in the
dropdown and formulates the correct syntax.
For example, in my case a value of 'abc' might be presented in the
dropdown, but if I have a textbox in the report that shows the value of
the parameter, it shows '[Product Dim].[Catg Label].&[abc]'
Ok, the problem is, what do I do if I want to imbed the report in an
application, as opposed to using the RS website presentation. This
means I don't want a prompt for the parameter, I want to feed the value
myself.
If I use 'abc' I get a syntax error. If I use '[Product Dim].[Catg
Label].&[abc]' I get 'The restrictions imposed by the CONSTRAINED flag
in the STRTOSET function were violated'.
So I'm continuing to experiment, but I'm very constricted by what RS is
doing with MDX under the covers.
TIA,
JimOr put another way, if I make the parameter Non-queried, how to I pass
the value?|||Umm, I think I'm getting it. I definitely have to pass the extended
version as a parameter.

No comments:

Post a Comment