On Thursday (29/10/09) evening I did a presentation at the London SQL Server User Group entitled “Deploying Reporting Services reports using msbuild” and I promised that I would make the demo material available. If you’re interested, read on…
The demo material and slide deck from my presentation can be downloaded from http://cid-550f681dad532637.skydrive.live.com/self.aspx/Public/BlogShare/20091031/AdventureWorks%20Sample%20Reports.zip
When unzipped (it can be unzipped to anywhere you like) the folder will appear as follows:
It contains the Adventure Works 2008 sample reports (which ordinarily can be downloaded from SQL Server samples on Codeplex) plus a “Deploy” folder which contains the SSRS msbuild tasks assembly and BIUserGroup.proj – the msbuild project file that I used in the demo. The only prerequisite to executing BIUserGroup.proj is that you have the sample database [AdventureWorks2008] present on the default local SQL Server instance and access to a Reporting Services server. If those things don’t exist where the .proj expects them to be then it should be a nice little exercise to edit the .proj file and/or command-line accordingly.
Execute using the following command-line (after navigating to the folder containing BIUserGroup.proj):
msbuild /target:DeleteFolders;CreateFolders;CreateDataSources;DeployReports;SetReportsDataSources BIUserGroup.proj
If deploying to a report server other than localhost then change it to:
msbuild /target:DeleteFolders;CreateFolders;CreateDataSources;DeployReports;SetReportsDataSources /property:ReportServerName=yourServerName BIUserGroup.proj
N.B. If the location of msbuild.exe is not in your %PATH% then you will need to include the path to it which will be something like “C:\Windows\Microsoft.NET\Framework\v3.5\”
Any questions? Stick them in the comments below.
Thank you to everyone that came along and especially thanks to Siddharth Mehta who did an impromptu demo of another Reporting Services deployment tool called RSScripter. RSScripter is a freeware tool that wraps rs.exe which, up until now, has been the de facto method for automating SSRS deployments. Siddharth has blogged about that at http://siddhumehta.blogspot.com/2009/10/how-to-automate-ssrs-reports-deployment.html. Thanks again Siddharth! (Aside: Siddharth also has a great idea about wrapping the code that I published in my recent blog Collecting information about your SSIS packages inside a SSRS report so his blog might be worth keeping an eye on to see if he talks about that!)
Finally, the biggest thank you to ex-colleague Steve Wright who built the SSRS msbuild tasks that I was demoing. Steve has put these SSRS msbuild tasks up on Codeplex at http://ssrsmsbuildtasks.codeplex.com/ with the most permissive license available so head there to learn more!
@Jamiet