How can I create a screen with different Views for C #

1

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

    
asked by anonymous 15.03.2016 / 18:28

1 answer

1

On your page, you can create a form with the reporting options of your system. The user selects one of the options and clicks a button. On the button, you can check which report option was chosen and render that report. Here is an example of rendering 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 });

link

    
15.03.2016 / 20:07