Wednesday, March 28, 2012

Packaging Business Intelligence Report project for deploymnet

Hi Guys,

I created my report project, now I build it and deploy it and it works fine.

In my web application project, I created an aspx page with reportViewer control and it works fine too. I publish my website for deployment and works fine. I created a web setup project and add my web application project to it and it works fine. It installs and create the virtual directory in wwwroot (Default WebSite) and it run the script on database too and create all tables and sp.

NowHow Do I deploy mey reports on the server as part of the installaton package. Can I do that or it has to be done manually by going to report server and create a new folder and add a DataSource and upload the *.rdl files...?

1 More thing, in my myReport.aspx page where I have the reportviewer control, I have the <ServerReport ReportServerUrl="http://localhost/reportserver/Intranet" Server Path="/MyReports/ProductsReports" />

Well I think this is hard coding as it might be different on the destination server where tha pllication is going to be deployed.

So is it correct way of doing it that in code behind in page load I set these values ( reportViewer1.ServerReport.ReportServerUrl = "..."; ) and I get the value from webconfig file. I have added the url in the web.config file and all my reports use that report server url.

Thanks for your help and suggestions in advance,

Regards,
Mehdi

Hi Mehdi,

We use this tool for deploying the reports to report server, its easy to use and solved our problem,

Reporting Services Scripter -http://www.sqldbatips.com/showarticle.asp?ID=62

Overview

Reporting Services Scripter is a .NET Windows Forms application that enables scripting and transfer of all Microsoft SQL Server Reporting Services catalog items to aid in transferring them from one server to another. It can also be used to easily move items on mass from one Reporting Services folder to another on the same server. Depending on the scripting options chosen, Reporting Services Scripter can also transfer all catalog item properties such as Descriptions, History options, Execution options (including report specific and shared schedules), Subscriptions (normal and data driven) and server side report parameters.

Not sure whetehr you can use the command script file with the installer or not, but having seprate deployment script for reports is better as you may have different web and database servers (as in our case).

Now regarding hardcoding the ReportServerUrl and report path you are right its not good practice to do that, web.config file should be used for storing these values so that you can update them on web server itself.

Mehdi6002:

it installs and create the virtual directory in wwwroot (Default WebSite) and it run the script on database too and create all tables and sp.

Can you tell how you run the database script through installer? :)

|||

Hello akjoshi,

Thanks for your reply. Would you just add a key to your web config file in the <appSettings> for the reports folder and reportServerUrl or there is a specific place that you have to include these, like in <httpHandlers> or < buildProviders> or ...

at the moment I just have 2 keys in <appSettings>

<add key="ReportServerUrl" value="http://..." />
<add key="ReportFolder" value="/ABC" />

is that a right way of doing it...?

To run SQL script while installing your DB, have a look at this article:

http://msdn2.microsoft.com/en-us/library/49b92ztk(VS.80).aspx

Regards,
Mehdi

|||

Yes Mehdi you are right, Using the <appSettings> section to add these keys is the right approch.

<appSettings>

<addkey="ReportServerUrl"value="http://ServerName/ReportServer"/>

<addkey="ReportPath"value="/ReportPath/"/>

</appSettings>

and acces it like this -

ReportServerUrl =newUri(ConfigurationManager.AppSettings["ReportServerUrl"]);

thanks for the link.

|||

Deploying a SQL Server Reporting Services 2005 report via an MSI -

http://blogs.msdn.com/bimusings/archive/2006/03/01/541599.aspx

No comments:

Post a Comment