none
Report viewer control problem in win forms RRS feed

  • Question

  • Hi friends
                 I am developing my desktop application using .net framework and c#.I am using Microsoft reporting services and in win forms I am using report viewer control to display the report.
     
               I am able to see the report viewer control but the report is not generating.Below is my code.Please check it and help me to rectify the problem.

    ds = new DataSet();
                RBLL = new ReportBLL();
                ds = RBLL.ShowCustomersReport(RBLL);
                if (ds.Tables[0].Rows.Count != 0)
                {
                    reportViewer1.Visible = true;
                    reportViewer1.ProcessingMode=Microsoft.Reporting.WinForms.ProcessingMode.Local;
                    reportViewer1.LocalReport.ReportEmbeddedResource = @"C:\Inetpub\wwwroot\Tirumala Gruha Nirman\Tirumala Gruha Nirman\CustomersContactList.rdlc";
                    reportViewer1.LocalReport.DataSources.Clear();
                    bindingSource1.DataSource = ds.Tables["customerreport"].DefaultView;
                    rpt.Name = "Customerscontactinfo_sp_showcontactlistofcustomers";
                    rpt.Value = this.bindingSource1;
                    //reportViewer1.LocalReport.DataSources.Add(new Microsoft.Reporting.WinForms.ReportDataSource("Customerscontactinfo_sp_showcontactlistofcustomers",bindingSource1));
                    reportViewer1.LocalReport.DataSources.Add(rpt);
                    reportViewer1.DocumentMapCollapsed = true;
                    reportViewer1.LocalReport.Refresh();
                    //MessageBox.Show(ds.Tables[0].Rows.Count.ToString());
                }

     
    • Moved by Aland Li Thursday, October 15, 2009 6:35 AM Incorrect forum. (From:Windows Forms General)
    Tuesday, October 13, 2009 12:49 PM

All replies

  • Hi shashi4mhyd,

    I have moved the thread from the "Windows Forms General" forum to the "Visual Studio Report Controls" forum since the issue is about report controls. There are more report controls experts in the "Visual Studio Report Controls" forum.

    Regards,
    Aland Li
    Please mark the replies as answers if they help and unmark if they don't. This can be beneficial to other community members reading the thread.
    Thursday, October 15, 2009 6:39 AM