locked
How to Bind multiple data into a single reportviewer? RRS feed

  • Question

  • User-1587907100 posted

    I have a situation here that i'm using a SSRS report for which im sending 4 parameters. For me the Report is Working fine. Now anothe issue came is that, the customer needs to see multiple reports in the same report viewer ie page by page(clicking the next page). 

    Im sending the Parameters using a Program? Can  I Achieve this?

    ReportViewer1.ServerReport.ReportServerCredentials = new ReportViewerCredentials(UserName, Password, Domain);
                            ReportViewer1.ServerReport.ReportServerUrl = new Uri(System.Configuration.ConfigurationManager.AppSettings["ReportServerURL"].ToString()); // Report Server URL
    
                            string strUrl = string.Empty;
                            strUrl = WebConfigurationManager.AppSettings["ReportAppName"].ToString() + "/" + ReportName.Trim();
                            ReportViewer1.ServerReport.ReportPath = "/" +
                                strUrl;
    
                            ReportViewer1.ShowParameterPrompts = true;
                            ReportViewer1.ShowPrintButton = true;
                            ReportViewer1.ShowExportControls = true;
                            ReportParameter[] reportParameters = new ReportParameter[4];
                            reportParameters[0] = new ReportParameter("AccountNo", AccNo, false);
                            reportParameters[1] = new ReportParameter("ServiceCode", sType, false);
                            reportParameters[2] = new ReportParameter("BillMonth", Month, false);
                            reportParameters[3] = new ReportParameter("BillYear", Year, false);
    
                            ReportViewer1.ServerReport.SetParameters(reportParameters);
                            ReportViewer1.ServerReport.Refresh();
    
    
    This is the present reporviewer code. In this Only AccountNo will be changed. The person will be selecting Multiple AccountNo.
    So when i click on the Next button of the report viewer i must get the report for the next Account Number. 
    Is it possible to achieve(if i select 5 account numbers then 5 pages should be there in the reportviewer)
    Saturday, March 3, 2012 8:13 AM

All replies