Does SSRS does support handling errors / exceptions? - reporting-services

I am trying to catch any error before the report is sent to subscribers.
If there is an error I would like to send a custom message like "server is in maintenance" or similar.
Microsoft Report Builder does not show any option to handle errors if SQL Server is down.

This is not possible within SSRS.
You could, if you like, have some routine which checks SQL Server is running.. But that is only one check. There are countless reasons why the report may not run.
I think you probably need to take a step back and look at what you are trying to achieve.

Subscriptions are stored as jobs on your server. You can write a query to check the details of these jobs. If your SQL Server is down, then nothing will work. But you could have a subscription that regularly reports errors which would fire off once the server is back online. I know this is a high level explanation, but it should point you in the right direction. Here's an article that may help get you started:
https://www.mssqltips.com/sqlservertip/1846/how-to-easily-identify-a-scheduled-sql-server-reporting-services-report/

Related

Error: The Cubes collection has been updated on the server

So, I'm going along in SSRS building a new report, as you do, and as I'm building the query from my SSAS cube I get the error: "The Cubes collection has been updated on the server." I can't find anything on the interwebs that would fix my issue. The odd thing is that I can build out the query for a while before getting this error, meaning I'm able to add 7-10 fields before the error presents itself. After the error I can't save it because it can't verify that the query is working. So I have to close it all down and restart building the query, but again, after a few fields get added I get the same error.
Yesterday we added a tabular instance to our BI server so we could convert our SSAS cubes to a tabular model and then utilize power bi and this seems to be when I started to see the issue. I'm not sure if they're related. I did restart the server last night hoping that would correct anything that went awry, but to no avail.
Cubes need processing. Process your cubes and try again.

Reporting services error trying to access a object that isn't called in the report

have a strange one. We are running Sql Server 11.0.3000. The report is giving an error
An error has occurred during report processing. (rsProcessingAborted)
Query execution failed for dataset 'Audit_Detail'. (rsErrorExecutingCommand)
Invalid object name 'dbAudit.tblRangeReport'.
The thing is, the report uses 3 stored procs to go after data in a database called dbSalarySurvey. The three sp's do not mention the dbAudit.tblRangeReport. There are no functions or views in the 3 sp's that access that table. Further more, if i run the report in VS 2012 the report runs. If i run profiler on the dbAudit table when VS runs the report, the report does not query the dbAudit table. Only when running the report from the web browser do i get this error. This more detailed version of the error come from running the report on the Sql Server REporting services computer.
I have tried restarting the reporting services service. We have also deleted this one report from the reporting services server and republished it. Have also tried to republish the dataset. Other reports in this project that use the datasource and the same tables run.
Anyway, was wondering if anyone had any sugguestions.
Thanks
shannon
It's fixed. it was a pebkak error in the stored proc. It's really strange though. Honest to goodness, the proc was running in my dev env but not when running from a browser. I had already checked profiler like was suggested below and done the xml scan too. In the end.. just missed it i guess.
You need to trace the SQL to determine.
Are you connecting to the right database?
Are the procs you expecting to see, the ones actually being run?
The procs you are running are correct?
Open SQL Server Profiler
Start New Trace
Click Event Selection, Select the following events
Click - Show All columns
Go into Column Filters
and filter on your DB, and possibly even your login name (the login name of the SSRS server)
Once you've done that, call your report and look to make sure all the procs are called that you expect. Track issues from there.

Stop subscription when no values returned in SQL Server Reporting Services

I am working on sending reports via emails to users. Now I am able to successfully send this reports my only problem is that for this reports there are times whereby the report shows no values. Now I want to ensure that when a report shows no values, it will not be send out.
I went through numerous forums with regards to this, in most times the solution I found is to create jobs, I have no idea how to go about in doing that.
Please note the I used just a normal subscription not the data driven subscription.
If you have any better yet simple solution I can use please assist. Please take me on a step by step work through in solving this problem.
I will highly appreciate your assistance
A service agent would be a big chunk of work to prevent the delivery of zero record reports. However, you will need to use a data-driven subscription to achieve your needs. Essentially, you would scan-ahead in your Stored procedure that produces the email recipient list to check for no records and return null as the list of recipients. I do not think this is possible without data driven subscription.
On a side note, if you are using an email server you could see if it's possible to do something similar on that side of things.

Sql Server 2008 R2 Reporting Services

I have a Specific Merchant report in SSRS and it sent out to different merchants everyday at 8am. But the Problem is they want to receive the report only if they have Transactions on it(Contains Data)
They don't want to receive it if the report is empty.
Is there a way to restrict that in SSSRS? Please let me know.
Take a look at data driven subscriptions. They've been around since SQL Server 2005 and are pretty useful for this kind of thing. Without knowing more about your scenario, I can't explain exactly how it'll work, but I'm certain it can. Check out here for more details:
http://msdn.microsoft.com/en-us/library/ms169673.aspx
SSRS subscriptions are pretty basic - either you are subscribed to receive a report or you are not. If you want/need to add logic to that you'll need to roll your own using a console application that you can run as a scheduled task and the reporting services API.

Cancel a running SQL Server Reporting Services report subscription?

I've created a Reporting Services report and set it to run on a subscription. (SQL Server 2005, if it makes a difference.)
Unfortunately, it looks like I've made some sort of error in the parameters, and it seems to have stalled, but it isn't actually failing, just sitting on "0 processed".
I want to cancel it to fix the error, but I can't figure out how. Stopping/restarting the services seems to make no difference.
What do I need to do to stop it?
A subscription is a SQL-Server Agent job, and is given a GUID as a title. Check the SQL-Server Agent job history, and if necessary stop the job.
If you have more than one subscription, check this link for a useful View on which jobs correspond to which subscription.
http://www.sqlservercentral.com/Forums/Topic254010-150-1.aspx