Ejemplo n.º 1
0
        public virtual CrystalDecisions.CrystalReports.Engine.ReportDocument CreateReport()
        {
            crptPdcPayableReport rpt = new crptPdcPayableReport();

            rpt.Site = this.Site;
            return(rpt);
        }
 public virtual CrystalDecisions.CrystalReports.Engine.ReportDocument CreateReport() {
     crptPdcPayableReport rpt = new crptPdcPayableReport();
     rpt.Site = this.Site;
     return rpt;
 }
Ejemplo n.º 3
0
        /// <summary>
        ///   Function to print  PdcpayablereportReport in curresponding Crystal report
        /// </summary>
        /// <param name="dspdcpayablereport"></param>
        public void PdcpayablereportReportPrinting(DataSet dspdcpayablereport)
        {
            try
            {
                crptPdcPayableReport crptPdcpayableReport = new crptPdcPayableReport();


                foreach (DataTable dtbl in dspdcpayablereport.Tables)
                {
                    if (dtbl.TableName == "Table")
                    {
                        crptPdcpayableReport.Database.Tables["dtblCompany"].SetDataSource(dtbl);
                    }
                    else if (dtbl.TableName == "Table1")
                    {
                        crptPdcpayableReport.Database.Tables["dtblpdcpayableReport"].SetDataSource(dtbl);
                    }
                }
                this.crptViewer.ReportSource = crptPdcpayableReport;

                SettingsSP spSettings = new SettingsSP();
                if (spSettings.SettingsStatusCheck("DirectPrint") == "No")
                {
                    base.Show();
                    this.BringToFront();
                }
                else
                {
                    crptPdcpayableReport.PrintToPrinter(1, false, 0, 0);
                }
            }

            catch (Exception ex)
            {
                MessageBox.Show("CRV13:" + ex.Message, "OpenMiracle", MessageBoxButtons.OK, MessageBoxIcon.Information);

            }
        }