public virtual CrystalDecisions.CrystalReports.Engine.ReportDocument CreateReport() { crptPDCreceivable rpt = new crptPDCreceivable(); rpt.Site = this.Site; return(rpt); }
/// <summary> /// Function to print PDCreceivableVoucher in curresponding Crystal report /// </summary> /// <param name="dspdcreceivablePrinting"></param> internal void PDCreceivableVoucherPrinting(DataSet dspdcreceivablePrinting) { try { crptPDCreceivable crptPdcReceivable = new crptPDCreceivable(); decimal decTotalAmount = 0; foreach (DataTable dtbl in dspdcreceivablePrinting.Tables) { if (dtbl.TableName == "Table") { crptPdcReceivable.Database.Tables["dtblCompany"].SetDataSource(dtbl); } else if (dtbl.TableName == "Table1") { foreach (DataRow drow in dtbl.Rows) { DataColumn dtClmn = new DataColumn("AmountInWords"); dtbl.Columns.Add(dtClmn); if (drow["Amount"].ToString() != string.Empty) { decTotalAmount = Convert.ToDecimal(drow["Amount"].ToString()); drow["AmountInWords"] = new NumToText().AmountWords(decTotalAmount, PublicVariables._decCurrencyId); } crptPdcReceivable.Database.Tables["dtblOtherDetails"].SetDataSource(dtbl); } } } this.crptViewer.ReportSource = crptPdcReceivable; SettingsSP spSettings = new SettingsSP(); if (spSettings.SettingsStatusCheck("DirectPrint") == "No") { base.Show(); this.BringToFront(); } else { crptPdcReceivable.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() { crptPDCreceivable rpt = new crptPDCreceivable(); rpt.Site = this.Site; return rpt; }