The following code is diaplaying a blank report; how do I fix it?
private void Form1_Load(object sender, EventArgs e)
{
LoadReport();
}
public void LoadReport()
{
this.reportViewer1.ProcessingMode =
Microsoft.Reporting.WinForms.ProcessingMode.Local;
Microsoft.Reporting.WinForms.LocalReport rep =
reportViewer1.LocalReport;
rep.ReportPath = "rptCustomer.rdlc";
DataSet ds = GetSalesDataFull();
Microsoft.Reporting.WinForms.ReportDataSource dsMaintenanceDS =
new Microsoft.Reporting.WinForms.ReportDataSource();
dsMaintenanceDS.Name = "Customer_Main";
dsMaintenanceDS.Value = ds.Tables["Main"];
rep.DataSources.Clear();
rep.DataSources.Add(dsMaintenanceDS);
rep.Refresh();
}
private DataSet GetSalesDataFull()
{
OleDbConnection Myconnection = null;
DataSet ds = new DataSet();
Myconnection = new
OleDbConnection(@"Provider=Microsoft.Jet.OLEDB.4.0 ; User Id=; Password=; Data
Source=C:\\Customer.mdb");
Myconnection.Open();
string sqlSalesData = "SELECT * FROM Customer";
OleDbCommand command = new OleDbCommand(sqlSalesData,
Myconnection);
OleDbDataAdapter salesOrderAdapter = new
OleDbDataAdapter(command);
salesOrderAdapter.Fill(ds, "Main");
salesOrderAdapter.Dispose();
command.Dispose();
return ds;
}