private void ExportReport(string exportTo) { try { if (objMaster.Current == null || objMaster.Current.Id == 0) { return; } long id = objMaster.Current.Id; frmInvoiceReport frm = new frmInvoiceReport(); frm.ObjInvoice = objMaster.Current; var list = General.GetQueryable <vu_Invoice>(a => a.Id == id).ToList(); int count = list.Count; frm.DataSource = list; frm.GenerateReport(); frm.ExportReport(objMaster.Current.InvoiceNo, "pdf"); } catch (Exception ex) { ENUtils.ShowMessage(ex.Message); } //if (objMaster.Current == null || objMaster.Current.Id == 0) return; //long id = objMaster.Current.Id; //frmPreAccInvoiceReport frm = new frmPreAccInvoiceReport(); //var list = General.GetQueryable<vu_Invoice>(a => a.Id == id).ToList(); //int count = list.Count; //frm.DataSource = list; //frm.GenerateReport(); //frm.ExportReport(objMaster.Current.InvoiceNo); }
private void ExportReport(string exportTo) { if (objMaster.Current == null || objMaster.Current.Id == 0) { return; } long id = objMaster.Current.Id; frmInvoiceReport frm = new frmInvoiceReport(); var list = General.GetQueryable <vu_Invoice>(a => a.Id == id).OrderBy(c => c.PickupDate).ToList(); int count = list.Count; frm.DataSource = list; frm.GenerateReport(); frm.ExportReport(objMaster.Current.InvoiceNo, exportTo); }