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

            rpt.Site = this.Site;
            return(rpt);
        }
Ejemplo n.º 2
0
        private void LinkLbl1_LinkClicked(object sender, LinkLabelLinkClickedEventArgs e)
        {
            DataSet ds       = new DataSet();
            String  strMonth = cmbMonth.Text;

            DateTime dtDate         = new DateTime(Convert.ToInt32(cmbYear.SelectedValue.ToString()), Convert.ToInt32(cmbMonth.SelectedValue.ToString()), 1);
            DateTime dtPreviousDate = dtDate.AddDays(-1);

            ds = myRep.GetInactiveEmployeesCoins(cmbYear.Text, dtPreviousDate.Month);

            if (ds.Tables[0].Rows.Count > 0)
            {
                ds.WriteXml("InactiveEmpCoins.xml");

                InactiveEmpCoins myCoins = new InactiveEmpCoins();
                myCoins.SetDataSource(ds);
                ReportViewer myViewer = new ReportViewer();

                myCoins.SetParameterValue("CompanyName", FTSPayRollBL.Company.getCompanyName());
                myCoins.SetParameterValue("Estate", "Estate :" + myDiv.ListEstates().Rows[0][0].ToString());
                myCoins.SetParameterValue("Period", "Month of " + cmbMonth.Text + "/" + cmbYear.Text);
                myViewer.crystalReportViewer1.ReportSource = myCoins;
                myViewer.Show();
            }
            else
            {
                MessageBox.Show("No Data Preview..!");
            }
        }