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

            rpt.Site = this.Site;
            return(rpt);
        }
Пример #2
0
        private void cmdDetail_Click(object sender, EventArgs e)
        {
            DataSet dataSetReport = new DataSet();

            dataSetReport = myReports.getCoinAnalysis(Convert.ToInt32(cmbYear.Text), Convert.ToInt32(cmbMonth.SelectedValue.ToString()));
            dataSetReport.WriteXml("CoinAnalysis.xml");

            if (dataSetReport.Tables[0].Rows.Count > 0)
            {
                CoinAnalysisRPT myaclist = new CoinAnalysisRPT();
                myaclist.SetDataSource(dataSetReport);
                ReportViewer myReportViewer = new ReportViewer();

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