Using shared datasets across different projects - sql-server-2008

facts: Visual Studio 2010, SQL Server 2008 R2, SQL Server 2008 R2 Reporting Services
I have a solution that consists of several projects. This is because of the inability to create nested deploy folders.
So my solution looks like this:
Students -> reports deploy to Students
StudentsGraduated -> reports deploy to Students/Graduated
StudentsGraduatedWithHonours _> reports deploy to Students/Graduated/WithHonours
StudentsBlueEyes -> reports deploy to Students/BlueEyes
StudentsGreenEyes -> reports deploy to Students/GreenEyes
All reports should use one dataset, with proper filters.
So I set up deployment so that each project deploys its datasets in /Student/DataSets. I made sure that each project has a identical dataset so that, when deployed, they all use the same dataset.
But apparently this does not work. Only the last deployed report can use the dataset :(
If I put all reports using a dataset in the same project it works but I have manually to move all reports to their proper locations.
Setting up all projects to deploy their reports in their own DataSet folder works too, but then I have a lot of identical DataSets lying around, which kinda beats the purpose.
After deployment manually resetting the dataset using the reportmanager works but is rather a tedious exercise when you have like 7 datasets on avg in each report and 19 reports......
Is this known phenomenon? Is it possible to have reports from different projects use the same dataset? If so, how?
I really would like to know your thoughts on this......

The way I was doing it should according to this link be the right way.
So I redid it, following the steps outlined in this link by Charlie Liao:
1. create the datasets in one of your projects
2. ADD these as existing items to another project
3. Set Overwrite Datasets to TRUE.
I think it was step 2 where I went wrong. I just recreated the dataset in each project, I did not add them. I deleted all datasets in all projects (but the first) and then readded all datasets to all projects as existing items, set Overwrite to True and deployed.
MAGIC!!
:)

Related

Is it possible to run all the reports in a given folder from report server?

I have a folder with around 15 reports in it, these are Report Server reports. To run each report individually will take a while, so I want them to run together. So, what I want to be able to do is somehow run all the reports in this folder, is this possible?
This is somewhat of an ambiguous question. Let me explain. What are you asking specifically?
Q: Can you run multiple reports at the same time?
A: Yes, and there are several ways to accomplish this.
1. You can use SQL agents
2. Use batch files with task scheduler
3. Use an SSIS package and use an agent to run them at specific times...etc...
Hopefully one of the reports does not depend on another and another thing that you have to take in to consideration is how hard you will be hitting the SSRS or SQL server. Running them all at one time may take longer than one at a time. depending on the bandwidth of the SQL Server and what tables are going to be locked up during each of these processes.
You might want to give a little more detail in your question...
I would recommend an SSIS package, especially as it also one of the options presented by #Michael that can email the Excel workbook too which you mentioned in an earlier comment.
The following resource covers quite well the execution and export of an SSRS report using SSIS, including code you will need as a starting point: Executing an SSRS Report from an SSIS Package.
You could save some time in coding the solution by using the following custom Task that can be integrated into SSIS: SSIS ReportGenerator Task.
There is one problem in your requirements though which is merging reports into one Excel workbook where I assume you want separate sheets for each report within the same workbook?
Reporting Services can use multiple worksheets (to divide a report up into pages a.k.a pagination) but only for a single report; it can't merge reports into one Excel file. This can be accomplished with custom code however. There's a somewhat basic example here: Merging workbooks into a master workbook with separate sheet for each file.
One way to run all the reports at once is to add subscription to all of them and set same subscription start time in all of the reports. what will happen is once the start time arrived all the reports will run simultaneously and will generate excel/pdf (any format specified) file at shared location.

Versioning of reports in reporting services (SSRS)

It is not the first time this question has been asked, but no solution has been found yet. The only thread I found somewhat relevant was this but it is 4 years old: SSRS Reports Versioning
Perhaps a solution has been found since then?
Back to my questions:
I have several reports in a Visual Studio solution (BIDS). From here I can deploy to several reporting servers: Test1, Test2 and Production.
1) It seems that the granularity of deployment is: Reports, Datasets and Datasources. This can be setup in Properties for the solution. But I want to be able to only deploy a single report, if I only have changes to one report. How do I do this? As it is now it seems that I have to deploy ALL reports.
2) Since I have more than 1 place to deploy there is a possibility of the reports getting out of sync. Normally the procedure would be to deploy the reports to Test until everything is fine, and thereafter deploy to Production. But since this is a manual process something can go wrong. Therefore I believe it would be nice to have some sort of versioning on the individual reports. But I can find no way of doing this? I'm thinking that it would be really nice if a timestamp and/or versionnumber could be set on the reports when they are deployed. Is there a way to do this?
Thanks in advance.
How about putting the version number of the report on the report itself? You would need to run the report to see it though.
To deploy a single report, right-click on the report name and Deploy to deploy that report (or dataset or data source).
As far as the deployment issues, you can use version control such as Visual Studio Team Foundation Server.
https://www.visualstudio.com/en-us/products/tfs-overview-vs.aspx

How can I compare Dev, Test, and Prod stages of my SQL Reporting Services report servers?

I am responsible for 196 different RDL files in a couple of dozen different folders and sub-folders and there are some key missing functionalities in SSRS that make maintaining report servers kind of a nightmare.
We get caught out all the time with differences between dev, test, and production. The project in visual studio doesn't allow you to deploy folder structures and there seems to be no easy way to compare everything deployed on various report servers.
What if any ways are there to make this a bit more maintainable?
You have a few options.
First one is to compare your ReportServer databases between your environments. Specifically the Catalog table which houses your folder structure and reports (which have a type = 2 I believe).
Second is the reporting services scripter too which can be found here:
http://www.sqldbatips.com/showarticle.asp?ID=62
This is an awesome tool that allows you to manage all your different environments and script them out for backup/restore and comparing.

SSRS Create development environment from Live server

I've inherited a live SSRS server and have been asked to amend a lot of reports that are on there.
Is there a quick way I can "export" all of the reports/data sources to a local instance so I can develop against it using BIDS?
e.g. Can I copy the ReportServer database from Production?
What else would I need to do?
I'd like to be able to have a Development copy of everything, with DataSources pointing to copies of the production databases but with the same names. Therefore I could re-write the report and re-define any SP's required locally, and then just deploy the new RDL to the server along with the ALTER SP scripts.
Is that possible or even sensible!?
Personally, with the volume you mentioned in the comments (30 RDL's and 3 databases) I wouldn't recommend some automated cloning of the entire Reporting setup from production to local. Instead, I'd suggest the following:
Reports
Go to the web front-end for your reportserver (typically http://yourserver/reports). Find each report, open it, and on the Properties tab click the Edit button. This button does not do what you might expect (edit the report inside the browser), but instead offers you a download of the RDL file. Save all the RDL files in one folder on disk.
With 30 reports manually downloading the reports may take you maybe an hour, max. This will probably beat most automated approaches. And since you should only need to do this step once...
Databases
It's not entirely clear from the question, but if you only have production databases and no DTAP setup yet, now may be a good time to start with that. You could host clones of the 3 production databases on a test server or possibly on your dev environment. Note that the schema's important here (should be the same as production), the data doesn't have to be entirely up to date.
Alternatively you can skip this bit and develop your reports against the production databases, assuming you can create connections from your dev machine to the production databases. Up to you.
Visual Studio / BIDS
This bit has a few parts to it:
Create a new reports project and solution in Visual Studio.
Add the existing RDL files you've downloaded earlier.
Depending on how the reports were set up, you may need to add shared data sources in your project, to get your reports up and running.
After all this, you should be able to preview your reports from Visual Studio (either with data coming from the "cloned" databases, or directly from production).
At this point you should also be able to safely make changes and preview/test them before deploying them.
Be sure to add the solution, reports, etc. to your version control system of choice.
Deployment
Once you've made changes you want to deploy to the reportserver, you have two basic options:
Deploy them using BIDS (see also the deployment properties MSDN page)
Go back to the web front-end, find the report, open the Properties tab again, click the Update button. This allows you to re-upload the RDL file with the changes you've made.
From now on you can just rinse and repeat on making updates and deploying the reports. No need for cloning/exporting the entire SSRS instance to keep things in sync.

Can you merge SSRS servers together other than manually moving each report

How can I merge the reports from seperate reporting servers into 1 location? In my current situation I am faced with 3 different reporting servers, each one used by a seperate department. 2 of them are running SSRS 2008r2, the third SSRS 2005.
I want to decommission the server that is running SSRS 2005 and then combine all the reports into one location to make things more maintainable.
There is about 100 reports in total. Nearly all of these use the same datasource. Is there any easy way these all on one database? Through sql, upload multiple reports at once, etc. I am currently not worried about permissions, just migrating all of the reports and setting the datasource for each.
Take a look at Reporting Services Scripter. It won't do the merge for you, but it greatly simplifies copying published reports between servers. Data source credentials don't transfer between servers, you'll need to update usernames/passwords after the transfer is complete.