public virtual CrystalDecisions.CrystalReports.Engine.ReportDocument CreateReport() { crptSalesInvoiceReport rpt = new crptSalesInvoiceReport(); rpt.Site = this.Site; return(rpt); }
public virtual CrystalDecisions.CrystalReports.Engine.ReportDocument CreateReport() { crptSalesInvoiceReport rpt = new crptSalesInvoiceReport(); rpt.Site = this.Site; return rpt; }
/// <summary> /// Function to print SalesInvoiceReport in curresponding Crystal report /// </summary> /// <param name="dsSalesInvoiceReport"></param> internal void SalesInvoiceReportPrinting(DataSet dsSalesInvoiceReport) { try { crptSalesInvoiceReport crptSalesInvoiceReportObj = new crptSalesInvoiceReport(); foreach (DataTable dtbl in dsSalesInvoiceReport.Tables) { if (dtbl.TableName == "Table") { crptSalesInvoiceReportObj.Database.Tables["dtblCompany"].SetDataSource(dtbl); } else if (dtbl.TableName == "Table1") { crptSalesInvoiceReportObj.Database.Tables["dtblSalesMaster"].SetDataSource(dtbl); } } this.crptViewer.ReportSource = crptSalesInvoiceReportObj; SettingsSP spSettings = new SettingsSP(); if (spSettings.SettingsStatusCheck("DirectPrint") == "No") { base.Show(); this.BringToFront(); } else { crptSalesInvoiceReportObj.PrintToPrinter(1, false, 0, 0); } } catch (Exception ex) { MessageBox.Show("CRV21:" + ex.Message, "OpenMiracle", MessageBoxButtons.OK, MessageBoxIcon.Information); } }