private void btnPrintMargin_Click(object sender, EventArgs e) { if (lkAccount.EditValue != null) { HCMIS.Desktop.Reports.AverageCostMarginReport xreport = new HCMIS.Desktop.Reports.AverageCostMarginReport(); xreport.DataSource = BLL.Receipt.GetMarginByAccount(Convert.ToInt32(lkAccount.EditValue), Convert.ToInt32(lkCategories.EditValue)); xreport.ShowPreview(); } }
private void lkCategories_EditValueChanged(object sender, EventArgs e) { if (lkAccount.EditValue != null) { HCMIS.Desktop.Reports.AverageCostMarginReport xreport = new HCMIS.Desktop.Reports.AverageCostMarginReport(); xreport.DataSource = BLL.Receipt.GetMarginByAccount(Convert.ToInt32(lkAccount.EditValue), Convert.ToInt32(lkCategories.EditValue)); xreport.CreateDocument(); PrintPreview.PrintingSystem = xreport.PrintingSystem; } }