Sql Server 2008 R2 Reporting Services - 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.

Related

Need an advice about SSRS reports

I'm writing you because I need some advice.
I'm working on SSRS reports and SQL Server 2012 during my internship for an enterprise. I wrote reports with interaction parameters, but some reports are very slow when someone wants to use/run them on SQL Server Reporting Services. As the enterprise uses Windows integrated security, I can't configure cached reports in order to improve execution time for reports with main (or default) parameters.
At the end, my goal is: if people who need to see reports can receive an email every Sunday for example, with a link for new reports... That could be awesome.
Could someone give me an advice please?
Thank you in advance.
You can schedule Reports on SSRS and send them in Excel format with default parameters. Just click on manage on the report and select subscriptions.
You can even select the emails from a query.
Check this for more info.

Does SSRS does support handling errors / exceptions?

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/

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.

SSRS Report Subscription emails stopped sending

Our reports in SSRS stopped sending. The last report was sent 2 days ago, and was send successfully, but since then none of the reports are being sent.
If I look at the SSRS web page for each report, there is no error. Simply showing the last run time as 2 days ago, so seems it didn't even try send.
Yesterday we did make some changes. But only moving a database from the Express version, to the regular version. We did not do anything that would affect the SSRS metadata (or at least we don't think we did...)
Where should we start looking to see why the report subscriptions stopped? Is there a process that could have accidentally been disabled? Thank you!
The Report subscriptions are created as jobs for the SQL Agent. You should see a long list of jobs with GUIDs as the names. Make sure that the SQL agent jobs are running. Going through the Steps of the SQL Reporting Services Configuration tool will recreate these jobs if you were to move the Reporting Service installation to another server. (I don't recall which step recreates the subscriptions. Just go through each pane and click "Apply.")
Depending on how you move things, you may need to backup and restore encryption keys, and you can easily end up in a state where two copies of subscription exist and are executed ( on different servers.) But in your case, where you didn't move SSRS, I'd look at the SQL Agent properties on the original server (Express) to see that the SQL agent is enabled and running, and check the history of the SQL Agent jobs, to see if there are any problems.

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