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

            rpt.Site = this.Site;
            return(rpt);
        }
 public virtual CrystalDecisions.CrystalReports.Engine.ReportDocument CreateReport() {
     crptPDCReceivableReport rpt = new crptPDCReceivableReport();
     rpt.Site = this.Site;
     return rpt;
 }
Esempio n. 3
0
        /// <summary>
        ///  Function to print  PdcReceivablereportReport in curresponding Crystal report
        /// </summary>
        /// <param name="dspdcReceivablereport"></param>
        public void PdcReceivablereportReportPrinting(DataSet dspdcReceivablereport)
        {
            try
            {

                crptPDCReceivableReport crptPdcreport = new crptPDCReceivableReport();



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

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

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

            }
        }