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

            rpt.Site = this.Site;
            return(rpt);
        }
 public virtual CrystalDecisions.CrystalReports.Engine.ReportDocument CreateReport() {
     crptMonthlyAttendance rpt = new crptMonthlyAttendance();
     rpt.Site = this.Site;
     return rpt;
 }
Exemple #3
0
        /// <summary>
        /// Function to print MonthlyAttendance in curresponding Crystal report
        /// </summary>
        /// <param name="dsMonthlyAttendance"></param>
        internal void MonthlyAttendancePrinting(DataSet dsMonthlyAttendance)
        {
            try
            {
                crptMonthlyAttendance crptMonthlyAttendance = new crptMonthlyAttendance();
                foreach (DataTable dtbl in dsMonthlyAttendance.Tables)
                {
                    if (dtbl.TableName == "Table1")
                    {
                        crptMonthlyAttendance.Database.Tables["dtblCompanyDetails"].SetDataSource(dtbl);
                    }
                    else if (dtbl.TableName == "Table2")
                    {
                        crptMonthlyAttendance.Database.Tables["dtblGridDetails"].SetDataSource(dtbl);
                    }
                }
                this.crptViewer.ReportSource = crptMonthlyAttendance;
                SettingsSP spSettings = new SettingsSP();

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

        }