The following code is diaplaying a blank report; how do I fix it?
private void Form1_Load(obje ct sender, EventArgs e)
{
LoadReport();
}
public void LoadReport()
{
this.reportView er1.ProcessingM ode =
Microsoft.Repor ting.WinForms.P rocessingMode.L ocal;
Microsoft.Repor ting.WinForms.L ocalReport rep =
reportViewer1.L ocalReport;
rep.ReportPath = "rptCustomer.rd lc";
DataSet ds = GetSalesDataFul l();
Microsoft.Repor ting.WinForms.R eportDataSource dsMaintenanceDS =
new Microsoft.Repor ting.WinForms.R eportDataSource ();
dsMaintenanceDS .Name = "Customer_Main" ;
dsMaintenanceDS .Value = ds.Tables["Main"];
rep.DataSources .Clear();
rep.DataSources .Add(dsMaintena nceDS);
rep.Refresh();
}
private DataSet GetSalesDataFul l()
{
OleDbConnection Myconnection = null;
DataSet ds = new DataSet();
Myconnection = new
OleDbConnection (@"Provider=Mic rosoft.Jet.OLED B.4.0; User Id=; Password=; Data
Source=C:\\Cust omer.mdb");
Myconnection.Op en();
string sqlSalesData = "SELECT * FROM Customer";
OleDbCommand command = new OleDbCommand(sq lSalesData,
Myconnection);
OleDbDataAdapte r salesOrderAdapt er = new
OleDbDataAdapte r(command);
salesOrderAdapt er.Fill(ds, "Main");
salesOrderAdapt er.Dispose();
command.Dispose ();
return ds;
}
private void Form1_Load(obje ct sender, EventArgs e)
{
LoadReport();
}
public void LoadReport()
{
this.reportView er1.ProcessingM ode =
Microsoft.Repor ting.WinForms.P rocessingMode.L ocal;
Microsoft.Repor ting.WinForms.L ocalReport rep =
reportViewer1.L ocalReport;
rep.ReportPath = "rptCustomer.rd lc";
DataSet ds = GetSalesDataFul l();
Microsoft.Repor ting.WinForms.R eportDataSource dsMaintenanceDS =
new Microsoft.Repor ting.WinForms.R eportDataSource ();
dsMaintenanceDS .Name = "Customer_Main" ;
dsMaintenanceDS .Value = ds.Tables["Main"];
rep.DataSources .Clear();
rep.DataSources .Add(dsMaintena nceDS);
rep.Refresh();
}
private DataSet GetSalesDataFul l()
{
OleDbConnection Myconnection = null;
DataSet ds = new DataSet();
Myconnection = new
OleDbConnection (@"Provider=Mic rosoft.Jet.OLED B.4.0; User Id=; Password=; Data
Source=C:\\Cust omer.mdb");
Myconnection.Op en();
string sqlSalesData = "SELECT * FROM Customer";
OleDbCommand command = new OleDbCommand(sq lSalesData,
Myconnection);
OleDbDataAdapte r salesOrderAdapt er = new
OleDbDataAdapte r(command);
salesOrderAdapt er.Fill(ds, "Main");
salesOrderAdapt er.Dispose();
command.Dispose ();
return ds;
}