SSRS exposing the Data source name of a data set - reporting-services

Because we design in a multi tier release environment, we have similar data on 3 SQL servers. We may have three copies of the same report directed to the different data bases. We name the reports with the source in the name. i.e. Report 1 UAT. Users do not pay attention. When a report is run and exported, you can no longer see the name so what looks like a production report could be a UAT copy. What I am trying to do is add a placeholder in the title that lists the data source for the reports primary dataset. I thought I would find a resource that said dataset1.datasource that returned the name I had assigned the data source at creation. That does not appear to be the case. Any ideas how to accomplish the same thing.

There's nothing in SSRS that would let you use a property of the Datasource, but there is a Globals!ReportName field that you could use since you state that the source is in the environment:
We name the reports with the source in the name. i.e. Report 1 UAT
Put a text box that uses the ReportName in it:
=Globals!ReportName

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.

SSRS report : How to change DataSource dynamically

I have 5 different sql servers instances with same initial catalog/database and I want to create a consolidate SSRS report which can hit all these 5 servers dynamically.
To achieve this I have created a datasource DDL with hard coded values as Server1,Server2...
All I want is when I choose Server 1 in datasource ddl then my main dataset should connect to Server 1 database,I can achieve this by dynamic connection string in local environment but when I deploy it to report server it does not work.
Please suggest whether it is feasible or not ?
You can achieve this by creating 5 reports in 1 and only displaying the active one.
Add all 5 data sources to your report
Setup a data set for each of the 5 data sources (sounds like you can just copy the first data set definition and change the data source)
Copy whatever charts or tablixes are using the dataset 5 times so that each copy uses a different data source
Setup a report parameter called something like "datasource" and specify 5 available values (these shoulr relate to your 5 data sources)
Setup each of the charts or tablixes to only appear if the "datasource" parameter matches their selected data source
As an extra bonus you can lay each of the charts and tablixes on top of each other so that from the user perspective it looks like there is only 1 chart/tablix and it changes data. In reality 5 different tablixes are appearing/disappearing just all in the same position.

Multiple Datasets in One Report in SSRS 2012

I'm trying to include two sets of data in SSRS 2012. In my datasource (called DS) I'm pulling two datasets - we'll call them OfficeActivity and Transactions. Neither dataset has any data relation to the other. The Transactions dataset is displayed in a table, while the OfficeActivity dataset will be used to populate some fields in the header - e.g. "Total Sales: $XXXXX.XX"
When I create a new SSRS project and use the wizard, I can create the Transactions table without problems, and it runs without a hitch. The problem is when I try to include the OfficeActivity data.
In the Report Data pane I right-click my DS datasource and choose "Add Dataset...". I give the new dataset a name, select DS as the datasource, and choose the OfficeActivity dataset under Available Datasets. The result looks like this:
The Report Data pane now looks like this:
However when I attempt to run the report I get the following error:
A data source instance has not been supplied for the data source 'dsOA'.
Can anybody provide any guidance on why this isn't working? Thank you in advance.
That looks like a possible bug in the wizard to me. Have you tried editing the properties of the dsOA dataset and setting the data source properties again?

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

SSRS - How to render child datasets

I'm designing a SSRS report in Visual Studio for use as a local report (so a SQL Server is not involved).
I have a table with customers/addresses that has the following columns:
AddressID
Firstname
Lastname
Street
Another table keeps orders and looks like this
OrderID
CustomerAddressID
ShopAddressID
So two columns from my order table link to datasets in the address table. I want to display both addresses in my report. The datasource for the report is a xsd dataset.
What's the best way to do this in SSRS? I'm pretty new to SSRS and kind of lost with the dataregions, lists, etc.
You should edit the source for the second dataset to include a parameterized query based on the first one. Something like:
SELECT * FROM other_table
WHERE CustomerAddressID = #adress
OR ShopAddressID = #address
Of course you should create the address parameter as report parameter(pointing to the first dataset)
Hope this makes sense.
Look at subreports.
To be a bit more specific, you need to define multiple data sources in your report that these other regions, tables, or whatever, obtain their data from. You then need callback handlers in your app that can provide that data for each datasource (quoting: "your application must handle the SubreportProcessing event of the LocalReport object.". The article explains this in detail.
Just curious (because I am going to through the same thing right now) - are you really designing SSRS reports (2008), or VS reports (2005)? Because the 2008 ReportViewer control cannot render SSRS 2008 reports ....