Apr 20, 2016

SSRS server mode how to open ssrs report from asp web page using report viewer

down voteaccepted
You need to separate out the URL to the server, report path and add the parameters to a parameters array.
Here's a sample:
    protected void Page_Init(object sender, EventArgs e)
    if (!Page.IsPostBack)
        // Set the processing mode for the ReportViewer to Remote
        reportViewer.ProcessingMode = ProcessingMode.Remote;

        ServerReport serverReport = reportViewer.ServerReport;

        // Set the report server URL and report path
        serverReport.ReportServerUrl =
            new Uri("http://<Server Name>/reportserver");
        serverReport.ReportPath =
            "/AdventureWorks Sample Reports/Sales Order Detail";

        // Create the sales order number report parameter
        ReportParameter salesOrderNumber = new ReportParameter();
        salesOrderNumber.Name = "SalesOrderNumber";

        // Set the report parameters for the report
            new ReportParameter[] { salesOrderNumber });


Post a Comment

Nam Le © 2014 - Designed by Templateism.com, Distributed By Templatelib