public virtual CrystalDecisions.CrystalReports.Engine.ReportDocument CreateReport() { crptSalesQuotationReport rpt = new crptSalesQuotationReport(); rpt.Site = this.Site; return(rpt); }
public virtual CrystalDecisions.CrystalReports.Engine.ReportDocument CreateReport() { crptSalesQuotationReport rpt = new crptSalesQuotationReport(); rpt.Site = this.Site; return rpt; }
/// <summary> /// Function to print SalesQuotationReport in curresponding Crystal report /// </summary> /// <param name="dsSalesQuotation"></param> /// <param name="strGrandTotal"></param> internal void SalesQuotationReportPrinting(DataSet dsSalesQuotation, string strGrandTotal) { try { DataTable dtblGrandTotal = new DataTable(); dtblGrandTotal.Columns.Add("GrandTotal", typeof(string)); DataRow dr = dtblGrandTotal.NewRow(); dr[0] = strGrandTotal; dtblGrandTotal.Rows.InsertAt(dr, 0); crptSalesQuotationReport crptSalesQuotationObj = new crptSalesQuotationReport(); foreach (DataTable dtbl in dsSalesQuotation.Tables) { if (dtbl.TableName == "Table1") { crptSalesQuotationObj.Database.Tables["dtblCompanyReport"].SetDataSource(dtbl); } else if (dtbl.TableName == "Table2") { crptSalesQuotationObj.Database.Tables["dtblSalesQuotationReportDetails"].SetDataSource(dtbl); } } crptSalesQuotationObj.Database.Tables["dtblGrandTotal"].SetDataSource(dtblGrandTotal); this.crptViewer.ReportSource = crptSalesQuotationObj; SettingsSP spSettings = new SettingsSP(); if (spSettings.SettingsStatusCheck("DirectPrint") == "No") { base.Show(); this.BringToFront(); } else { crptSalesQuotationObj.PrintToPrinter(1, false, 0, 0); } } catch (Exception ex) { MessageBox.Show(" " + ex.Message, "OpenMiracle", MessageBoxButtons.OK, MessageBoxIcon.Information); } }