コード例 #1
0
        public virtual CrystalDecisions.CrystalReports.Engine.ReportDocument CreateReport()
        {
            crptBonusAndDeduction rpt = new crptBonusAndDeduction();

            rpt.Site = this.Site;
            return(rpt);
        }
コード例 #2
0
 public virtual CrystalDecisions.CrystalReports.Engine.ReportDocument CreateReport() {
     crptBonusAndDeduction rpt = new crptBonusAndDeduction();
     rpt.Site = this.Site;
     return rpt;
 }
コード例 #3
0
ファイル: frmReport.cs プロジェクト: jsoques/openmiracle
        /// <summary>
        /// Function to print BonusDeductionReport in curresponding Crystal report
        /// </summary>
        /// <param name="dsBonusDeductionReport"></param>
        internal void BonusDeductionReportPrinting(DataSet dsBonusDeductionReport)
        {
            try
            {
                crptBonusAndDeduction crptBonusAndDeduction = new CrystalReports.Reports.crptBonusAndDeduction();


                foreach (DataTable dtbl in dsBonusDeductionReport.Tables)
                {
                    if (dtbl.TableName == "Table1")
                    {
                        crptBonusAndDeduction.Database.Tables["dtblCompanyDetails"].SetDataSource(dtbl);
                    }
                    else if (dtbl.TableName == "Table2")
                    {
                        crptBonusAndDeduction.Database.Tables["dtblBonusAndDeductionReport"].SetDataSource(dtbl);
                    }
                }
                this.crptViewer.ReportSource = crptBonusAndDeduction;
                SettingsSP spSettings = new SettingsSP();

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