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