How can I create a screen with different views for report c#

Asked

Viewed 97 times

1

is the following have a system that has some reports wanted to make a single screen (webForm) and as the user makes a report call the screen generates this report and shows on screen.

1 answer

1

On your page, you can create a form with your system’s reporting options. The user selects one of the options and clicks on a button. On the button, you can check which report option was chosen and render that report. Here’s an example of how to render the report:

reportViewer.ProcessingMode = ProcessingMode.Remote;

    ServerReport serverReport = reportViewer.ServerReport;

    // Define o servidor do SSRS e qual o report:
    serverReport.ReportServerUrl =
        new Uri("http://<Server Name>/reportserver");
    serverReport.ReportPath =
        "/AdventureWorks Sample Reports/Sales Order Detail";

    // Cria variavel com parâmetros do relatório
    ReportParameter salesOrderNumber = new ReportParameter();
    salesOrderNumber.Name = "SalesOrderNumber";
    salesOrderNumber.Values.Add("SO43661");

    // Seta os parâmetros ao relatório.
    reportViewer.ServerReport.SetParameters(
        new ReportParameter[] { salesOrderNumber });

https://msdn.microsoft.com/en-us/library/aa337091.aspx

Browser other questions tagged

You are not signed in. Login or sign up in order to post.