none
Business Object as RDLC datasource at run time RRS feed

  • Question

  • Hi All,

    i am binding the business object as rdlc data source according to following link

    http://msdn.microsoft.com/en-us/library/ms251784%28v=vs.80%29.aspx

    It works fine, if I specify the report to report viewer at design time. but i have multiple reports and i want to assign report to report viewer at runtime. I am trying to do as follow.

     

     

    reportViewer1.LocalReport.ReportPath = System.Windows.Forms.Application.StartupPath + "\\Reports\\IncomeStatementReport.rdlc";
                        reportViewer1.ProcessingMode = Microsoft.Reporting.WinForms.ProcessingMode.Local;
                        reportViewer1.LocalReport.DataSources.Clear();
                        this.BindingSource.DataSource = mangager.getIncomeStatement();
                        reportViewer1.LocalReport.DataSources.Add(new Microsoft.Reporting.WinForms.ReportDataSource("BindingSource"));
                       
                        reportViewer1.DocumentMapCollapsed = true;
                        reportViewer1.RefreshReport();

     

    But its not working in this way. I think there is some mistake. Kindly let me know how to fix it

     

    Many Thanks

    Shuja

     


    shuja
    Saturday, February 5, 2011 10:37 PM

All replies