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