public virtual CrystalDecisions.CrystalReports.Engine.ReportDocument CreateReport() { crptReceiptReport rpt = new crptReceiptReport(); rpt.Site = this.Site; return(rpt); }
/// <summary> /// Function to print ReceiptReport in curresponding Crystal report /// </summary> /// <param name="dsReceiptReport"></param> internal void ReceiptReportPrinting(DataSet dsReceiptReport) { try { crptReceiptReport crptReceiptReport = new crptReceiptReport(); foreach (DataTable dtbl in dsReceiptReport.Tables) { if (dtbl.TableName == "Table") { crptReceiptReport.Database.Tables["dtblCompany"].SetDataSource(dtbl); } //else if (dtbl.TableName == "Table1") //{ // crptPaymentVoucher.Database.Tables["dtblPaymentMaster"].SetDataSource(dtbl); //} else if (dtbl.TableName == "Table1") { //dtbl.Columns.Add("Sl No", typeof(decimal)); //dtbl.Columns["Sl No"].AutoIncrement = true; //dtbl.Columns["Sl No"].AutoIncrementSeed = 1; //dtbl.Columns["Sl No"].AutoIncrementStep = 1; crptReceiptReport.Database.Tables["dtblReceiptMaster"].SetDataSource(dtbl); } } this.crptViewer.ReportSource = crptReceiptReport; SettingsSP spSettings = new SettingsSP(); if (spSettings.SettingsStatusCheck("DirectPrint") == "No") { base.Show(); this.BringToFront(); } else { crptReceiptReport.PrintToPrinter(1, false, 0, 0); } } catch (Exception ex) { MessageBox.Show("CRV6 " + ex.Message, "OpenMiracle", MessageBoxButtons.OK, MessageBoxIcon.Information); } }
public virtual CrystalDecisions.CrystalReports.Engine.ReportDocument CreateReport() { crptReceiptReport rpt = new crptReceiptReport(); rpt.Site = this.Site; return rpt; }