Monday 5 July 2010

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

I received an error in Visual studion 2005 when trying to pass a parameter to my datasource. My parameter was a datetime field which the user uses a calendar to select their require date. In the datasource was a column called TRXDATE which was a datetime column. Everytime i tried to rest the report within Visual Basic I received the following error ('XXXX' being my parameter)

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

After a few wasted hours which i will never get back, I realised that the problem was down to Visual Basic 2005 and nothing to do with my report. When publishing the report to Report Server it worked fine.

My advice when receiving this issue is to try the following:

1. Test the datasource in SQL. Check that it works with a date being passed through with the format of YYYY-MM-DD. If no then the problem is the data source
2. Publish the report to reportserver and test. If problem then check parameter and datasource setup in Visual Studio 2005
3. Look forward to the upgrade to SQL Server 2008

No comments:

Post a Comment