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

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

                foreach (DataTable dtbl in dsDailyAttendanceReport.Tables)
                {
                    if (dtbl.TableName == "Table1")
                    {
                        crptDailyAttendanceReport.Database.Tables["dtblCompany"].SetDataSource(dtbl);
                    }
                    else if (dtbl.TableName == "Table2")
                    {
                        crptDailyAttendanceReport.Database.Tables["dtblAttendance"].SetDataSource(dtbl);
                    }
                }
                this.crptViewer.ReportSource = crptDailyAttendanceReport;
                SettingsSP spSettings = new SettingsSP();

                if (spSettings.SettingsStatusCheck("DirectPrint") == "No")
                {
                    base.Show();
                    this.BringToFront();
                }
                else
                {
                    crptDailyAttendanceReport.PrintToPrinter(1, false, 0, 0);
                }
            }
            catch (Exception ex)
            {
                MessageBox.Show("CRV9 " + ex.Message, "OpenMiracle", MessageBoxButtons.OK, MessageBoxIcon.Information);
            }
        }
 public virtual CrystalDecisions.CrystalReports.Engine.ReportDocument CreateReport() {
     crptDailyAttendanceReport rpt = new crptDailyAttendanceReport();
     rpt.Site = this.Site;
     return rpt;
 }