Hi,
I want return report viewer as an out variable from wcf service to client application.
because I am using SSRS report and report authentication should be taken where the wcf
service was installed. After fetch data in wcf I want to return a result to client application and display in report viewer.
Below are the code in wcf service but not working:
- public ReportViewer GetReportSSRS(CustomDataReport customeReport, string _outputIDs, string reportName)
- {
- ReportViewer report = new ReportViewer();
- report.ProcessingMode = Microsoft.Reporting.WinForms.ProcessingMode.Remote;
- report.ServerReport.ReportServerUrl = new Uri("http://Testserver/ReportServer");
- Microsoft.Reporting.WinForms.ReportParameter _from = new Microsoft.Reporting.WinForms.ReportParameter("Start", customeReport.Start.ToString());
- Microsoft.Reporting.WinForms.ReportParameter _to = new Microsoft.Reporting.WinForms.ReportParameter("Finish", customeReport.Finish.ToString());
- Microsoft.Reporting.WinForms.ReportParameter _OutputId = new Microsoft.Reporting.WinForms.ReportParameter("OutputValue", _outputIDs);
- Microsoft.Reporting.WinForms.ReportParameter _name = new Microsoft.Reporting.WinForms.ReportParameter("Name", customeReport.Name);
- Microsoft.Reporting.WinForms.ReportParameter _dataGroup = new Microsoft.Reporting.WinForms.ReportParameter("DataGroupName", customeReport.DataGroup.Name);
- Microsoft.Reporting.WinForms.ReportParameter _displayTotal = new Microsoft.Reporting.WinForms.ReportParameter("DisplayTotal", customeReport.DisplayTotal.ToString());
- eport.ServerReport.ReportPath = "/Report/CustomDataReport";
- Microsoft.Reporting.WinForms.ReportParameter _Logo = new Microsoft.Reporting.WinForms.ReportParameter("LogoPath", "Logo.jpg");
- report.ServerReport.SetParameters(new Microsoft.Reporting.WinForms.ReportParameter[] { _from, _to, _OutputId, _name, _dataGroup, _displayTotal, _Logo });
- report.ShowParameterPrompts = false;
- report.ServerReport.DisplayName = reportName;
- return report;
- }