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