private void btnPrint_Click(object sender, EventArgs e) { ExpiryReport nexreport = new ExpiryReport(); nexreport.HubName.Text = GeneralInfo.Current.HospitalName; nexreport.TitleTwo.Text = "Expired Products"; DataSet ds = new DataSet(); (gridDetailReport.DataSource as DataTable).TableName = "NearExpiry"; ds.Tables.Add((gridDetailReport.DataSource as DataTable)); nexreport.DataSource = ds; nexreport.ShowPreviewDialog(); }
public CreateReport(Chart aChart) { prodDb = new ProductDB(); exp = new ExpiryReport(aChart); expiredList = prodDb.ExpiryList(); }