This is a repost of my original with an updated CopyReport task that now sets the datasources for the report after it is copied. Both download links have been updated.
File Attachment: ReportingServicesTasks.zip (74 KB)
Scenario: Moving Reports from a QA environment to Production Staged environment to Production.
The last thing I really wanted to do was deploy reports again from Visual Studio to other environments. Once everything gets the thumbs up in the QA I want to move exactly what was on QA to the Production Staged environment.
All of the tasks are for moving between two instances of reporting services. The included tasks are:
Some of the tasks exist just support others. Like CopyDataSource, CopyReport, CopyResource all exist to support the CopyFolder task. The tasks that I use to move between different environments are DeleteFolder, CreateFolder, CopyFolder and UpdateDataSource. An example of how these are used is below and there is also an example file in the download.
<Project DefaultTargets="CopyReportsStaged" xmlns="http://schemas.microsoft.com/developer/msbuild/2003"> <UsingTask TaskName="ReportingServicesTasks.CopyFolder" AssemblyFile="$(MSBuildProjectDirectory)\bin\ReportingServicesTasks.dll" /> <UsingTask TaskName="ReportingServicesTasks.CreateFolder" AssemblyFile="$(MSBuildProjectDirectory)\bin\ReportingServicesTasks.dll" /> <UsingTask TaskName="ReportingServicesTasks.DeleteItem" AssemblyFile="$(MSBuildProjectDirectory)\bin\ReportingServicesTasks.dll" /> <UsingTask TaskName="ReportingServicesTasks.UpdateDataSource" AssemblyFile="$(MSBuildProjectDirectory)\bin\ReportingServicesTasks.dll" /> <Target Name="CopyReportsStaged"> <!-- Delete anything that may exist on staged --> <DeleteItem ReportServerUrl="http://StagingServer/ReportServer/ReportService2005.asmx" ItemName="TestReportsFolder" />
<CreateFolder ReportServerUrl="http://StagingServer/ReportServer/ReportService2005.asmx" Folder="TestReportsFolder" ParentFolder="/" /> <CopyFolder ReportServerUrl="http://QAServer/ReportServer/ReportService2005.asmx" CopyToReportServerUrl="http://StagingServer/ReportServer/ReportService2005.asmx" CopyFromPath="/TestReportsFolder" CopyToPath="/TestReportsFolder" />
<UpdateDataSource ReportServerUrl="http://StagingServer/ReportServer/ReportService2005.asmx" DataSourceName="/DataSources/XMLDataSource1" ConnectionString="http://Server1/StagedWebService.asmx" /> </Target></Project>
These tasks may someday show up in an opensource project but since I don’t have the time right now to do that I wanted to at least get them out here to maybe save some people time.
Remember Me
Powered by: newtelligence dasBlog 2.1.8102.813
The opinions expressed herein are my own personal opinions and do not represent my employer's view in any way.
E-mail
Theme design by Jelle Druyts