public virtual CrystalDecisions.CrystalReports.Engine.ReportDocument CreateReport() { DepartmentSalaryChart rpt = new DepartmentSalaryChart(); rpt.Site = this.Site; return(rpt); }
private void button1_Click(object sender, EventArgs e) { BAL.Reports s = new BAL.Reports(); using (DataTable table = s.SelectDepartmentThroughBankID(Convert.ToInt32(comboBox1.SelectedValue))) { using (Reports.DepartmentSalaryChart chart = new Reports.DepartmentSalaryChart()) { chart.SetDataSource(table); crystalReportViewer1.ReportSource = chart; crystalReportViewer1.Refresh(); } } }