Display report services reports on an aspx page

I created a simple report services report. I would like to include this report on the website. I read that we need to deploy the report to the report server in order to use it on the aspx page. Can I include a report in a website project and display a report? Crystal reports work like this. If possible, can you provide some links or some code that will do this.

Thanks, Sridhar.

+3
source share
2 answers

I did some research, and this is what I found. You can display the report by including the report in the website design. The report extension must be "RDLC". The following link will provide information on how to convert an RDL report to an RDLC report so that it can be processed locally.

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

+2
source

The code on 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 should not have a subdirectory. ReportServerUrl is part of the SQL Server Reporting Services configuration information (listed as "Reporting Services URL").

bin ASP.NET (, -, - prod):

  • Microsoft.ReportViewer.Common.dll
  • Microsoft.ReportViewer.WebForms.dll
+1

Source: https://habr.com/ru/post/1717936/


All Articles