adolf garlic
adolf garlic

Reputation: 3096

The query contains the XXXXXName parameter, which is not declared. SSRS2008/MDX query

Parser: The query contains the XXXXXName parameter, which is not declared. (msmgdsrv)

I have no idea why I keep getting this error. It occurs when I change the MDX in the query designer and trying OKing out of the query designer.

The strange thing is that the parameter DOES exist, I can see it in the parameters section of the dataset dialog. I am creating it before I do anything else with the query.

Upvotes: 7

Views: 16011

Answers (2)

Christopher Scott
Christopher Scott

Reputation: 3156

Although the seemingly intuitive thing to do is add the Parameter in the Dataset Properties window, this actually does not declare the parameter for the query for some odd reason.

To add the parameter, click the Parameters toolbar button in the Query Designer window. From there you can add your parameter names and default values.

enter image description here

Once you've done this, the global parameter list will contain that parameter and allow you to use expressions etc..

Upvotes: 9

jvilalta
jvilalta

Reputation: 6799

Is the parameter defined at the report level? That might be what's missing.

Upvotes: 0

Related Questions