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/Bookmark

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

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