Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

SQL Server Reporting Studio report showing "ERROR#" or invalid data type error

Tags:

I struggled with this issue for too long before finally tracking down how to avoid/fix it. It seems like something that should be on StackOverflow for the benefit of others.

I had an SSRS report where the query worked fine and displayed the string results I expected. However, when I tried to add that field to the report, it kept showing "ERROR#". I was eventually able to find a little bit more info:

The Value expression used in [textbox] returned a data type that is not valid.

But, I knew my data was valid.

like image 408
Josh Avatar asked Jan 29 '14 12:01

Josh


People also ask

How do I check my report server error log?

This log is on by default and can be found in: C:\Program Files\Microsoft SQL Server\MSRSXX. SQL2012\Reporting Services\LogFiles or some variation depending on your SQL Server installation.

Where is the default location of report server logs to troubleshoot Reporting Services report issues?

View the Report Server Logs The default directory for log files for a default installation is <drive>\Program Files\Microsoft SQL Server\MSRS130. MSSQLSERVER\Reporting Services\LogFiles .

How do I use IIF in SSRS expression?

Using IIF Function in SSRS We are going to add a new field to the report data set to determine if the Order Year is the Max or Current Year. As shown below, the dataset properties window is opened, and the Fields tab is selected. After clicking Add, at the bottom of the list a new field is added.


2 Answers

Found the answer here.

Basically, it's a problem with caching and you need to delete the ".data" file that is created in the same directory as your report. Some also suggested copying the query/report to a new report, but that appears to be the hard way to achieve the same thing. I deleted the .data file for the report I was having trouble with and it immediately started working as-expected.

like image 193
Josh Avatar answered Sep 30 '22 20:09

Josh


After you preview the report, click the refresh button on the report and it will pull the data again creating an updated rdl.data file.

like image 25
Chad Horton Avatar answered Sep 30 '22 20:09

Chad Horton