views:

596

answers:

2

Hi,

I created a simple reporting services report. I would like to include this report in the web site. I read that we need to deploy the report to the report server in order to use it in the aspx page. Is it possible to include the report in the web site project and display the report? Crystal reports work like that. If it is possible, can you please give some links or some code that will do this.

Thanks, sridhar.

A: 

The code in the aspx page looks something like this:

<%@ Register Assembly="Microsoft.ReportViewer.WebForms, Version=9.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" Namespace="Microsoft.Reporting.WebForms" TagPrefix="rsweb" %>

<rsweb:ReportViewer ID="MainReportViewer" runat="server" ProcessingMode="Remote" Width="100%" ShowParameterPrompts="False">
   <ServerReport ReportPath="/SubDirectory/ReportName" ReportServerUrl="http://sqlrs/reportserver" />
</rsweb:ReportViewer>

ReportName is the name of your .RDL file, etc. Your report path does not have to have a subdirectory. The ReportServerUrl is part of the SQL Server Reporting Services configuration information (listed as "Reporting Services URL").

Your ASP.NET bin directory needs to include the following files (maybe not on your dev machine, but on your prod web server more likely):

  • Microsoft.ReportViewer.Common.dll
  • Microsoft.ReportViewer.WebForms.dll
Michael Maddox
My report is not deployed to report server. I am trying to make it work with out deploying to report server.
Sridhar
You probably need an RDLC file for that. RDLC files don't require a reporting server.
Michael Maddox
how do i get the RDLC file? is it just renaming the file to have extension "RDLC"?
Sridhar
No, it's not that easy. I'd have to look it up. I think you can do it in Visual Studio with a different report builder.
Michael Maddox
A: 

I did some research and this is what I found. It is possible to display the report by including the report in the web site project. The report extension should be "RDLC". The following link will give the details on how to convert the "RDL" report to "RDLC" report so that it can be processed in local mode.

http://msdn.microsoft.com/en-us/library/ms252109%28VS.80%29.aspx

Sridhar