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

            rpt.Site = this.Site;
            return(rpt);
        }
Ejemplo n.º 2
0
        /// <summary>
        ///  Function to print ChequeReport in curresponding Crystal report
        /// </summary>
        /// <param name="dsChequeReport"></param>
        internal void ChequeReportPrinting(DataSet dsChequeReport)
        {
            try
            {

                crptChequeReport crptChequeReport = new crptChequeReport();
                foreach (DataTable dtbl in dsChequeReport.Tables)
                {
                    if (dtbl.TableName == "Table1")
                    {
                        crptChequeReport.Database.Tables["dtblChequeReport"].SetDataSource(dtbl);

                    }
                    else if (dtbl.TableName == "Table2")
                    {
                        crptChequeReport.Database.Tables["dtblCompany"].SetDataSource(dtbl);
                    }

                }

                this.crptViewer.ReportSource = crptChequeReport;

                SettingsSP spSettings = new SettingsSP();

                if (spSettings.SettingsStatusCheck("DirectPrint") == "No")
                {
                    base.Show();
                    this.BringToFront();
                }
                else
                {

                    crptChequeReport.PrintToPrinter(1, false, 0, 0);
                }

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

        }
 public virtual CrystalDecisions.CrystalReports.Engine.ReportDocument CreateReport() {
     crptChequeReport rpt = new crptChequeReport();
     rpt.Site = this.Site;
     return rpt;
 }