public virtual CrystalDecisions.CrystalReports.Engine.ReportDocument CreateReport()
        {
            crptAdvancePayment rpt = new crptAdvancePayment();

            rpt.Site = this.Site;
            return(rpt);
        }
 public virtual CrystalDecisions.CrystalReports.Engine.ReportDocument CreateReport() {
     crptAdvancePayment rpt = new crptAdvancePayment();
     rpt.Site = this.Site;
     return rpt;
 }
示例#3
0
        /// <summary>
        /// Function to print AdvancePaymentReport in curresponding Crystal report
        /// </summary>
        /// <param name="dsAdvancePaymentReport"></param>
        internal void AdvancePaymentReportPrinting(DataSet dsAdvancePaymentReport)
        {
            try
            {
                crptAdvancePayment crptAdvancePayment = new crptAdvancePayment();



                foreach (DataTable dtbl in dsAdvancePaymentReport.Tables)
                {
                    if (dtbl.TableName == "Table1")
                    {
                        crptAdvancePayment.Database.Tables["dtblCompanyDetails"].SetDataSource(dtbl);
                    }
                    else if (dtbl.TableName == "Table2")
                    {
                        crptAdvancePayment.Database.Tables["dtblAdvancePayment"].SetDataSource(dtbl);
                    }
                }
                this.crptViewer.ReportSource = crptAdvancePayment;
                SettingsSP spSettings = new SettingsSP();

                if (spSettings.SettingsStatusCheck("DirectPrint") == "No")
                {
                    base.Show();
                    this.BringToFront();
                }
                else
                {
                    crptAdvancePayment.PrintToPrinter(1, false, 0, 0);
                }
            }
            catch (Exception ex)
            {
                MessageBox.Show("CRV" + ex.Message, "OpenMiracle", MessageBoxButtons.OK, MessageBoxIcon.Information);
            }
        }