SSRS report throws an error that says a parameter doesn’t exist when the report designer clearly shows the parameter exists

The order in which the parameters appear in the BIDS Report Data tab can be the difference between your report executing and it failing. Failure to pay attention to this will give you very mysterious error messages!

"The Value expression for the query parameter PARAMNAME contains and error:The expression that references the parameter PARAMNAME does not exist in the parameters collection. Letters in the names of parameters must have the correct case"

It may be visible at design time but not come into scope when the particular expression is evaluated!

You can force the order of the parameters by going into the XML code and adjusting as needed.

Advertisements
This entry was posted in Frustrating errors, SQL and tagged , , . Bookmark the permalink.

12 Responses to SSRS report throws an error that says a parameter doesn’t exist when the report designer clearly shows the parameter exists

  1. Nicholas says:

    Thank you! I was getting very frustrated with SSRS. The parameter order was my problem.

    Like

  2. Jimbo Jones says:

    Wow. This was gold. Was tearing my hair out and this solved my issue. Just find the parameter section and move the parameter with issue to the top! thanks,

    Like

  3. Graeme says:

    Thank you for this – very helpful!

    Like

    • Richard says:

      Thanks for the encouragement! SSRS can be so simple in so many ways but there are some real gotchas. I’m working through a pesky sorting issue now. I might post about that, but I also have a post planned about E/R Studio. Anyway, not sure when I’d get to either. We’ll see.

      Liked by 1 person

  4. sinma says:

    You are absolutely right . Thank you very much for your input.

    Like

  5. ajitha m k says:

    This helped, Thanks.

    Liked by 1 person

  6. RJ Gilmore says:

    I know this is my problem, too, but have tried everything in the XML to arrange the order and nothing is working. Do I change the data sent parm order to match the parms in the SSRS parm list or what? I have 12 data sets and 5 totals parms which are not all used in each data set. Any suggestions would be hlp

    Like

    • Richard says:

      Hmm… This is a tough one, RJ. Did you try matching the order in each list? What happened when you did that? Sadly, this is something you may just have to play with. Try and get your head into the interpreter and think about the order it needs the parameters and put them into that order. If that doesn’t work, let me know. I’ll be mulling over what else might work.

      Like

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s