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