public virtual CrystalDecisions.CrystalReports.Engine.ReportDocument CreateReport() { ResultStudentWiseCR rpt = new ResultStudentWiseCR(); rpt.Site = this.Site; return rpt; }
private void StudentWisePrintSingleButton_Click(object sender, EventArgs e) { if (student.StudentId != null) { ResultStudentWiseDataSet ds = new ResultStudentWiseDataSet(); ResultStudentWiseTableAdapter resultStudentWiseTableAdapter = new ResultStudentWiseTableAdapter(); resultStudentWiseTableAdapter.FillStudentBy(ds.ResultStudentWiseDataTable, (int)StudentWiseSessionComboBox.SelectedValue, (int)StudentWiseYearComboBox.SelectedValue, (int)StudentWiseTermComboBox.SelectedValue,(int)student.StudentId); ReportForm rf = new ReportForm(); rf.Show(); ResultStudentWiseCR report = new ResultStudentWiseCR(); report.SetDataSource(ds); report.SetParameterValue("DisciplineName", Depertment.DisciplineName); report.SetParameterValue("SchoolName", Depertment.SchoolName); rf.crystalReportViewer1.ReportSource = report; } else { MessageBox.Show("No such Student"); } }