SSRS report : How to change DataSource dynamically - reporting-services

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.

Related

SSRS exposing the Data source name of a data set

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

SSRS 2005 page break per report

I have a specific type report that I need to generate multiple copies of. What I want to do is pass a string of report IDs to SSRS and generate all of the individual reports (let call them subreports) with those IDs in one master report with each subreport on a new page. I've already tried making a subreport and placing it in a table with grouping. This worked the closest so far. It gave me all the pages I needed, but it generated the report for the first ID number over and over. Is there anyway to do this or am I gonna have to jump through a lot of hoops?
If you are passing the string of report IDs to a parameter on the master report, I think using a table and subreport should work. You'll need a way to split out the report IDs using a dataset on the master report and return them one per row (so you can pass each report ID individually to the subreport via the details row of the table).
I was going to recommend a table-valued parameter for this, but since they don't exist in SQL Server 2005 check out Arrays and Lists in SQL Server 2005 by Erland Sommarskog for a few other options.

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?

SQL Server Report with page columns only works in export to PDF

I created a report (using Report Builder 3.0) which has two page "newsletter style" columns (I'm not talking about Tablix columns here). I put a tablix in column (because you can't really put something in the other columns). My data should continue in the second column before moving to the next page.
That only works when I export to PDF or TIF or use the print function from the report viewer. The report viewer itself completely ignores this setting (and has twice as many pages). Also export to other formats doesn't have this.
Anyone knows how to fix this?
When you fetch the content can you split that into 2 part and then say within report you have 2 controls that display each part of the content
Here is the steps
Say you DB had 1 cell data
Split that into 2 parts within the DB itself (you will need to define the logic on where the split should happen)
When the data comes to report it comes as 2 rows 1 column even though in DB the data is 1 row 1 column
In Report you have 2 text/label controls and each display each rows
Hope that helps
This appears to be built-in behavior. TIFF export is actually the same as printing with the ActiveX plug-in so those 2 are always related. No way to get it to work for the viewer or other formats...
Don't know what the behavior is in the Windows Forms report viewer control...

Column headers from different dataset in MS Reporting Services

I basically need to load table headers from one dataset and table data from another. Is it possible to do with MS Reporting services?
As I can see table is associated with the data by DataSetName property and it can be only one dataset.
You can include data from a different dataset to the one linked to the table by including the dataset name in the expression, for example:
=First(Fields!HeaderField1.Value, "HeaderDataset")
If the dataset isn't dynamic, then you can manually define the dataset (or edit it) Ctrl + alt + D (I think) should pop the dataset window open (in RS2005/2000) failing that I think it's under: view - other windows
I have used this where a stored proc uses temp tables and RS is unable to determine the final dataset structure correctly.