Пример #1
0
        public virtual CrystalDecisions.CrystalReports.Engine.ReportDocument CreateReport()
        {
            crptEmployeeAddressBook rpt = new crptEmployeeAddressBook();

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

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

        }