Today we will explore the final step in report creation: deployment. After you get done creating all your reports in BIDS, the final step is to make those reports viewable to the general population. Luckily there is a simple way to deploy reports to the report server from inside of Visual Studio, which is exactly what we are going to cover today. For this demonstration we are going to use the sample reports for Adventure Works.
The first step in deploying reports in to run Visual Studio as an administrator. If you do not do this you could run into some permissions issues later on in the deployment process.
Once Visual Studio is running in Administrator mode, the report server settings and data source settings need to be set. This ensures that the reports are pointing to the correct data sources when running on the report server. You access this menu by right clicking on the solution name in the solution explorer pane and selecting the Properties option.
There are several items that need to be set in the properties. First is the TargetDataSourceFolder. This is the path for the shared Data Sources. By default you will want this to be set to Data Sources if you are running in native mode. SharePoint mode will cause this location to vary slightly, generally the default in that case is http://server/Share Documents/Data Sources. If you want to keep things organized better you can create a subfolder for each report in the Data Sources folder. Be sure to use caution if you have OverwriteDataSources set to true as you will ruin other reports if you overwrite a data source for another report set. So next time you name your data source DataSource1, think again! The TargetReportFolder is going to be the name of the folder that houses all the reports for this project. In our case we are going with AdventureWorks 2008 Sample Reports. You can make the DataSource and Report folders the same to house all the information for a set of reports together. Finally the TargetServerURL is where the reports are going to be deployed to. Here you can enter a server name (such as http://localhost) or a server IP address (http://127.0.0.1 is the IP address for localhost which we will use in this example) followed by the report server directory (the default is /reportserver). If you have multiple instances of reporting services running at the same time on a machine it is necessary to add the instance name to the end of the URL.
Now that all your settings for your report server are configured you are ready to build and deploy the report. Again you will need to right click on the solution name and this time select Deploy from the menu. When you do this, the project will be built and deployed to the server you specified in the properties page. As seen on the output pane, the report deployed without errors or warnings. If the data source had existed on the server we would have had a warning stating the data source could not be deployed because it existed and OverwriteDataSource is set to false (an option in the properties).
You are now free to access the report server and view your reports. To do this, open Internet Explorer and again run as administrator. Simply type in the URL for your report manager (default is http://localhost/reports) and you will see the folder that was specified in the properties has been created.
Also, when going into the Data Sources folder, you will see the AdventureWorks2008 data source name matches the data source in BIDS.
In the next article in this series we will explore securing your report server with an SSL certificate as well as security including restricting permission on the reports so that only certain people can access specific reports.