Reporting Services report logs report destination - sql-server-2008

We have SSRS 2008 and have a heap of data driven subscriptions.
We've been tasked with creating a map of all the reports every user receives.
The query:
SELECT * FROM ReportServer.dbo.ExecutionLog2
gives us almost the information we want.
For what we want, it lacks the destination of the report.
Is there a way of finding out where a report was emailed?
My alternative I guess is to look at analysing the Exchange logs.
Is that a reasonable alternative?

You could get the destination of the data driven subscription from columns Parameters and DataSettings in the table Subscription from report server database.
The 2 columns record as xml format , you could get the node in column Parameters and get the node in column DataSettings. Then you could get correspond receiver for subscription.

Related

SSRS data-driven subscription file share export: error on one export, others work fine

I have a report with a data-driven subscription that exports Excel files to a file share each day, one per region. (Region is a parameter in the report.) The data for the subscription comes from a configuration table that is populated with the list of regions for a given day by another process. That process takes the Region values from the same table/field that the report query uses to match to the subscription region name in its WHERE clause, so the values should be identical.
The process runs fine but the Executions table shows only two executions (with the correct parameters from the config table), and only two of three exports are generated. Subscriptions.LastStatus = 'Done: 3 processed of 3 total; 1 errors.'
The other two exports are generated correctly, so it's not a
permissions issue.
Reports for all three regions export from the
web portal to excel just fine, so it would seem there's nothing
preventing an export for that one region.
There are no differences in the web-portal-exported reports between the 'Central Office' region and
the 'Rocky Mountain' region that I can see (other than the data,
obviously). Both have a space in the name, both have the same number of pages.
I do not have access to the Report Server logs. I have requested permissions to be able to view the logs, but that's going to take a while.
In the interim, can anyone think of anything else I could try or check? Thanks in advance.

How to specify different from addresses for difference subscription recipients?

I have an SSRS report that is sent out to different user groups based on the business function. I need the subscription to change the from address depending on who the report is being sent to. For example when the report is for the Finance group it should be sent from Finance#example.com but when it is for the Procurement group it should come from ProcurementAdmin#example.com.
Presently the report is just sent from the address configured in the from field of the subscription settings.
I read in a post somewhere once that changing the owner ID in the Subscriptions table would do it - but that did not change anything for me.
Is there a way to make the from address dynamic in an SSRS subscription?
I'm using SQL Server and SSRS 2008 R2.
The simplest way to do this is to create multiple subscriptions with different from addresses configured. But if you have the Enterprise or Business Intelligence edition of SQL Server there is a better way.
You can accomplish this using a data driven subscription. This allows you to set all of the subscription options with SQL queries. You will need Enterprise or Business Intelligence edition of SQL Server in order to use data driven subscriptions.
I'm assuming your report takes a parameter to determine the type of report (e.g. finance, procurement, etc.)
First go to the Subscriptions section for your report and create a new data-driven subscription:
You then configure your data source for the SQL query that will return your subscription information. Note: this doesn't actually have to rely on tables in the database you can synthesize all of the values in a SELECT statement if that works for you.
You could use a query similar to this to get all of your settings:
SELECT 'finance' AS type,
'finance_report_people#example.com' AS rcptAddr,
'FinanceAdmin#example.com' AS fromAddr
UNION ALL
SELECT 'procurement',
'procurement_report_people#example.com',
'ProcurementAdmin#example.com'
Then the next couple of screens allow you to use the values determined by this query to set various options for the subscription. In this case you would set your parameter value to the type field, your to value would use the rcptAddr field, and you would set your from field with fromAddr.
In this way you can configure dynamic subscriptions that have different recipients, reply to addresses, from addresses, subjects, etc. all based on the parameter value you're passing to the report.

Using the report execution web service, how can I tell if a report's table returned no rows?

I have a C# project which consumes the ReportExecution2005.asmx web service. In my project, I loop through some database records, pass the row's data to the report's parameters, then render the report.
The report is a simple, one dataset, one table report, that I end up exporting to Excel.
When I'm rendering the report, I don't know if the parameters I am passing will actually result in the report's dataset/table returning any rows. If the report does return data, then I send my report out in an email. However, if the the report's table is empty, then I need to skip this report and move on the next report.
Is there anyway I can check my rendered report to see if the dataset or table returned any data?
Thanks for looking.
This sounds more like something that could be done in the backend sql than in the report. The report just generates, to my knowledge there is nothing baked in that can do this. The knowledge of a subscription is pretty basic .... but you can do dynamic subscription that can go off of database logic.
I believe you could do a multi tiered approach to make a subscription be dynamic for this.
Create a job in SQL Database for a database that keeps track of reports having data. Just do a simple insert into RecordTable select (reportname), dateadd(day, datediff(day, 0, getdate()), 0), Count(*) from (tabledataset).
Have this job run every day at a set time to populate if your dataset has rows or not.
Create a dynamic subscription to perform a query if the rowcount is greater than zero to send out, if not do not.

Generate SSRS Reports for resolved cases by month for selected cusotmers

I have an SSRS report that generates customer invoice for selected customers. I want to be able to generate this report each month for selected customers. What do I do to be able to generate a report for, say, April for ABC Corp.? I have the case 'created on' date.
Look up Reporting Services Subscriptions.
Standard subscriptions allow you to set up the report server to send you a report for ABC Corp every month. You enter the parameters (such as ABC Corp) the way you would enter them to generate the report manually.
Data Driven Subscriptions allow you to automatically distribute reports to people. The parameters can be different for each person, and it doesn't look the same as the manual approach. You may create stored procedures to manage data driven subscriptions, and these are going to be more complex than standard subscriptions.

What's the "cheapest" way to check if a report exists on my Reporting Server?

Given a SQL Server 2008 Reporting Services installation, what's the "cheapest" way to check whether a given report (given by its report name + report path, e.g. /MyReports/SomeOddballReport) exists (or not) ?
I see lots of potential candidates on the ReportServer web service - which one is the quickest and the one using the least amount of system resources??
FindItems()
GetReportDefinition()
GetReportLink()
GetProperties()
Any others I'm missing? Thanks for any hints and pointers! I find the Reporting Services webservice interface to be lacking in documentation and samples, really......
Seems fastest way is to use FindItems method.
All other options seems to be metadata related, as them retrieve properties for that items (so it needs to find item first and, so, get those metadata)
Due to MS Reporting Services running on MS SQL you have an easy option to return report names and to see if a report exists. Inside of SQL Server there is a database called ReportServer. Within that database is a table that is called Catalog. The Catalog table stores data sources, reports, and some other vital information. The key fields are the "Name" and the "Type". Type distinguishes between a report / a datasource / etc. Name of course is obvious, it is the name of the report.
To get all reports on your reporting service instance try this:
USE ReportServer
GO
SELECT Name, Description FROM Catalog WHERE Type=2
To get all data sources:
USE ReportServer
Go
SELECT Name, Description FROM Catalog WHERE Type=5
So if you have a name or at least know of what a report starts with you can do a LIKE query:
SELECT Name FROM Catalog WHERE Name LIKE '%Employee Report%'
Check out my blog for more info:
http://weblogs.sqlteam.com/jhermiz/archive/2007/08/14/60285.aspx
Also since you mentioned it therte is a path field which may contain data like this:
/ETime/Job Hours Summary By Department