THE SQL Server Blog Spot on the Web

Welcome to SQLblog.com - The SQL Server blog spot on the web Sign in | |
in Search

Jamie Thomson

This is the blog of Jamie Thomson, a freelance data mangler in London

Deploying Reporting Services reports using msbuild

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:

image

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

Published Saturday, October 31, 2009 9:12 AM by jamiet

Comment Notification

If you would like to receive an email when updates are made to this post, please register here

Subscribe to this post's comments using RSS

Comments

 

Siddharth Mehta said:

I am already on my way to extending you code. BTW, there's a typo in my last name, it's MEHTA not METEH :)

November 1, 2009 8:34 AM
 

jamiet said:

Apologies Siddharth. Now corrected!

November 1, 2009 3:02 PM
 

Ganesh said:

i need to create a package for ssrs report

June 29, 2010 4:50 AM
 

MartinD said:

Is the demo material still available? The download URL doesn't work any more.

March 31, 2011 4:09 AM
 

jamiet said:

March 31, 2011 4:11 AM
 

MartinD said:

Yes, that works now thanks. Not sure what went wrong before. You don't happen to know if RSScripter works with R2? I can't seem to find a definitive answer anywhere.

May 16, 2011 5:51 AM
 

John Dhom said:

This is the original post that turned me on to ssrsmsbuildtasks close to 2 years ago. Thanks.

I'm automating report deployment for yet another project and ran into something new [to me]. Image files that need to be deployed to the reports folder.

Do you know if it is possible to leverage ssrsmsbuildtasks to upload the image files? My attempt using AddResource was unsuccessful.

I've posted a summary of the issue/question here:  http://stackoverflow.com/questions/6696553/ssrsmsbuildtasks-adding-images-files-to-ssrs-report-deployment-using-addresourc

Thanks

July 15, 2011 12:53 PM
 

jamiet said:

Hi John,

I'm afraid I don't know. If I were you I would address the question to the guy who provides ssrsmsbuildtasks at http://ssrsmsbuildtasks.codeplex.com/discussions

Regards

JT

July 16, 2011 5:26 AM
 

Gargi Jain said:

Hi.. I was trying to deploy 20 reports simultaneously using msbuild technique u have explained.. I am not able to find how to deploy shared data sets... Reply as soon as possible..

September 7, 2011 9:39 AM
 

jamiet said:

"Reply as soon as possible"

I might have done had you not demanded it like that.

September 7, 2011 9:49 AM
 

Gargi Jain said:

Sorry for my mistake but i need it in my project thats why i asked u to reply soon... My intensions were not wrong... But i still dont understand how to do this...

September 8, 2011 1:55 AM
 

jamiet said:

OK, apology accepted.

ssrsmsbuildtasks now has support for Shared Datasets. Check out the latest release at: http://ssrsmsbuildtasks.codeplex.com/releases/view/

September 8, 2011 4:20 AM
 

Gargi Jain said:

Hi... I am not able to open yhis page... Page Not Found Error

September 8, 2011 4:30 AM
 

jamiet said:

So try modifying it a little. I'm sorry if this sounds rude but try using your initiative, maybe change the URL a little. Maybe to this: http://ssrsmsbuildtasks.codeplex.com/releases/

September 8, 2011 4:37 AM
 

Gargi Jain said:

Thanks a lot...

September 8, 2011 5:59 AM
 

Rishi Mehta said:

That BIUserGroup file does not support deployment of shared data sets. I moved to that http://ssrsmsbuildtasks.codeplex.com/releases/ and downloaded the secon zip file. But it does not contain project file for msbuild with .proj extension. The SSRSMSBuildTaskDemoR2_Native is not supported by msbuild. Please help me.

September 9, 2011 5:40 AM
 

jamiet said:

If you want help with it then I suggest you go and ask the developer at http://ssrsmsbuildtasks.codeplex.com/discussions

September 9, 2011 5:54 AM
 

Rishi Mehta said:

Inside Bin folder there are no dlls. I copied one from the first link on http://ssrsmsbuildtasks.codeplex.com/releases/ and tried to run msbuild file but it is not able to solve the dependencies as some of the dlls are missing. Can you tell me how to run it. I tried it a lot but i am not getting it.

September 12, 2011 1:43 AM

Leave a Comment

(required) 
(required) 
Submit

This Blog

Syndication

Powered by Community Server (Commercial Edition), by Telligent Systems
  Privacy Statement