Click here to Skip to main content
15,879,239 members
Articles / Database Development / SQL Server / SQL Server 2008
Article

SSRS Downloading .RDL Files

Rate me:
Please Sign up or sign in to vote.
4.00/5 (1 vote)
5 Mar 2012CPOL2 min read 61.7K   2.3K   15   8
This examle shows you how to create a C# program to download SSRS reports from a server.

Introduction

Working with SSRS reports hosted on a server recently, I was faced with the dilemma of having to put reports from the server into a source control repository for branching / tagging / and just all around good measure.  Initially, I started manually downloading each report individually, but this grew to be a headache and I was prone to miss a report someone had modified (not to mention I felt like a punch card operator from 1967).

So I started asking around if someone knew of a way to just grab all the reports from the server, but nobody I talked to had heard of anything to do that (and wondered why I would want to... as I say to myself, "okayyy").  Next, I researched the functionality and found some terrible 3rd party software out there attempting to do this (all the time wondering how MS missed the boat on this one).

I eventually found out this can be done by writing your own program and attaching to an SSRS web service that resides on your server!  All right, well lets get to it then... 

Background

You'll need to be familiar with C#, Visual Studio 2010, and a little familiar with SQL Server Reporting Services 2008 R2.  I'll walk you through linking in the web service.  You'll also need to know the URL for your SSRS Web Service.  This might be a good reference for you if you're not familiar with how SSRS and it's Web Services operate: Report Server Web Service

Attaching to the SSRS Web Service

Start a new C# WinForms project, or download the source I've provided here, then follow these steps:

Right click on "References" then click the menu option here:

 

Next click this button at the bottm of the screen:

Now click this button on the bottom of the next page:

Now you'll need to enter the url address to your SSRS asmx file.  You're going to have to know the address to this service.  The one I used below to show Documentation and Methods is on my network and will not work for you (so I blanked it out).

You'll want to give a good Web reference name then click the "Add Reference" button.  For the purpose of this article and the source code I've upload, I named mine RSWebReference_SSRS.

This concludes the article.  You'll need to download the source code to see how I actually use the webservice.  It's very straightforward.  FYI, I did run into some hitches that I was able to resolve;  So, this article should be a good starting point for anyone wanting to be able to download any or all of their SSRS reports from a server.

History

License

This article, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)


Written By
Software Developer (Senior)
United States United States
I've been a software developer for over 25 years. Worked on commercial grade Point of Sale and Order Entry software applications.

Worked with Symbol Technology Handheld bar code scanners quite a bit. Written Sqllite libraries that run on these devices.

Develop client/server solutions in ASP.NET. MVC, and MVVM design patterns.

Comments and Discussions

 
QuestionProblem with SSRS Authentica​tion - don't want to use Custom Authentica​tion - Please guide Pin
Member 1069685125-Mar-14 4:25
Member 1069685125-Mar-14 4:25 
Questiondoesn't seem to download all of the rdls Pin
willaa6-Mar-13 3:52
willaa6-Mar-13 3:52 
AnswerRe: doesn't seem to download all of the rdls Pin
Patrick Harris10-Mar-13 7:14
Patrick Harris10-Mar-13 7:14 
QuestionDownloading reports within a folder Pin
Poojanadubettu15-Nov-12 8:53
Poojanadubettu15-Nov-12 8:53 
AnswerRe: Downloading reports within a folder Pin
Patrick Harris15-Nov-12 9:59
Patrick Harris15-Nov-12 9:59 
GeneralRe: Downloading reports within a folder Pin
Patrick Harris16-Nov-12 2:21
Patrick Harris16-Nov-12 2:21 
GeneralRe: Downloading reports within a folder Pin
Patrick Harris16-Nov-12 2:45
Patrick Harris16-Nov-12 2:45 
GeneralRe: Downloading reports within a folder Pin
Member 42009327-Aug-13 20:43
Member 42009327-Aug-13 20:43 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.