SQL Server administration and T-SQL development, Web Programming with ASP.NET, HTML5 and Javascript, Windows Phone 8 app development, SAP Smartforms and ABAP Programming, Windows 7, Visual Studio and MS Office software
Development resources, articles, tutorials, code samples, tools and downloads for ASP.Net, SQL Server, Reporting Services, T-SQL, Windows, AWS, SAP HANA and ABAP

A severe error occured on the current command. The results, if any, should be discarded.

During the execution of your MS Reporting Services 2000 reports, did you ever had the error message :

An error occured during report processing.
Cannot read the next data row for the data set Dataset1.
A severe error occured on the current command. The results, if any, should be discarded.

I had a few times, and when the error occurs the report displays nothing where the result set is supposed to be displayed. And this is actually not a desirable situation especially if you have demanding clients.

The strange thing about this error, the reporting services report runs successfully on some cases and fails on others depanding on the parameters sent to the stored procedure which is forming the datasource of the report. And the more strange thing about this error is that when I run the sql command which I cathed from the SQL Profiler it runs successfully with returning data as expected.

Also when previewing the Reporting Services report from MS Visual Studio .Net 2003, I occasionally get the below error messages.

Processing Errors

Processing error message about the severe error occured and the discarded results.

An error has occured during the reporting processing.

Query execution failed for data set 'Dataset1'.

A severe error occured on the current command. The results, if any, should be discarded.

This error message coming from Microsoft Visual Studio .Net 2003 is slightly differs from the error message coming during running the report from a report server.

An error occured during report processing.
Cannot read the next data row for the data set Dataset1.
A sever error occured on the current command. The results, if any, should be discarded.

But the effects are same. Probably the message is a little bit changes because of the program which is displaying the error.

At last I found a clue which may cause this problem.

When running the query I obtained from SQL Profiler, I realized that although the statement executes successfully, a warning message is thrown by the SQL Server.

This warning message in my case was, "Warning: Null value is eliminated by an aggregate or other SET operation."

When I examined the stored procedure running for this report, I found the below SQLstatement as causing for the warning message

SELECT @MaxUpdateDate = MAX(UpdateDate) FROM OrderDetails (NoLock)
Code

I altered the above sql statement as shown below in order to eliminate the warning message.

SELECT @MaxUpdateDate = MAX(ISNULL(UpdateDate,0)) FROM OrderDetails (NoLock)
Code

In the end eliminating this warning message by changing the sql statements forming the data source of the report, I was able to run my reporting services reports successfully without an error message both on Visual Studio .Net IDE and Reporting Services ReportServer.

You can have further look at the Microsoft site for "Query execution failed for data set '{0}'." SQL Server Reporting Services warning message at rsErrorExecutingCommand at Microsoft ErrorStrings.



SQL Server

SQL Server 2019 Installation
download SQL Server 2019
download SQL Server 2017
download SQL Server 2016
download SQL Server 2014
download SQL Server 2012
MacOS ve SQL Server 2019


Copyright © 2004 - 2021 Eralper YILMAZ. All rights reserved.