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