Visual Studio Development Bookmark and Share   
 index > Visual Studio Report Controls > Report viewer control problem in win forms
 

Report viewer control problem in win forms

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 byAland LiMSFTThursday, October 15, 2009 6:35 AMIncorrect forum. (From:Windows Forms General)
  •  
shashi4mhyd  Tuesday, October 13, 2009 12:49 PM
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.
Aland Li  Thursday, October 15, 2009 6:39 AM

You can use google to search for other answers

Custom Search

More Threads

• Page Margins are jacked up
• no crystal report tool in toolbox!!!
• ReportViewer assembly binding fails
• MicroSoft.ReportViewer.Webforms in .Net 1.1 / VS.Net 2003
• Newbie who's lost on ReportViewer? *confused*
• You have to click print twice in order to get it to print?
• Reports with common styles
• Debugging ReportViewer? Is it possible?
• VS2005 Reportviewer Page Layout differs
• How to print multiple copies of a report in report viewer control.