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