The value provided for the report parameter is not valid for its type

While building parameterized reports in SQL Server Reporting Services 2005 you may come across the following error when viewing the report in Preview.

An error occurred during local report processing.

The value provided for the report parameter ‘YourParameter’ is not valid for its type.

I encountered this error even though I had not specified a default value for the parameter.  So how can it be not valid if it doesn’t exist?

I found a perfect solution in this little article.

Apparently it has something to do with the Allow blank value checkbox.  In my report the data type for my parameter was Integer.  And as explained in the mentioned article, the Allow blank value checkbox is checked and greyed out.  Luckily the little trick of switching to String, unchecking the checkbox and switching back to Integer solves the error.

But why?  How come that an error occurs due to a setting that is greyed out?  A greyed out setting, doesn’t that mean that its value is not applicable in combination with the other settings?  Apparently not.  Well, I guess that’s a bug then, right?

If someone has a good explanation on this behaviour don’t hesitate to post a comment!

Share

Tags: , ,

  1. Peter’s avatar

    Wow…all this time recreating datasets and it was a bug…thanks for the info!

    Reply

  2. Horia’s avatar

    is it just me or this is being extremely silly ? :) good thing some1 posted this .. cheers

    Reply

  3. Hans’s avatar

    Thanks for sharing this, blog based solutions to an issue are making me happy :-) You get 2 at once, first the solution to the issue, mostly with some side info, and second you get to know a nice blog.

    Reply

    1. Valentino Vranken’s avatar

      Thank you for that nice comment Hans! When you’re struggling with a certain problem, it certainly helps when someone has written a blog post about it and it’s even better when the post actually mentions a solution (which is not always the case). I guess that’s the reason why I started blogging in the first place :-)

      As a blogger, I have to say that I also get more satisfaction writing posts that offer a solution, or real articles with a certain purpose in mind, as opposed to the announcement-style posts. It’s the first category that attracts the most readers and comments.

      Best regards,
      Valentino.

      Reply

  4. Rodney’s avatar

    Thanks for this. Just like Peter I spent quite some time recreating datasets, changing queries, changing parameter types to no avail. This has got to one of the most annoying bugs, because it seems like it would be so simple to fix. Oh well, thanks for the blog entry.

    Reply

  5. Patrick’s avatar

    Thank you for posting this! I was pulling my hair out trying to figure this out.

    Reply

    1. Cindy’s avatar

      Thanks from me also. This was one of several annoyances for the day, I would have wasted a lot more time trying to figure this one out had it not been for your post. It is much appreciated.

      Reply

  6. Christian U’s avatar

    Very helpful tip. Thank you.
    I migrated rdls from a previous version to RS 2005 rdls, and it seems that option appeared out of nothing

    Reply

  7. Parisa’s avatar

    thanks a lot.it helps me

    Reply

  8. Vasilis T’s avatar

    Thank the lord! You saved me from a big headache….
    Very strange behaviour. I wouldn’t have figured it out for ages if you hadn’t told me.

    Many thanks!

    Reply

    1. Nanda’s avatar

      Thanks a lot.. it helps me

      Reply

© 2008-2012 A Developer's Blog All Rights Reserved