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

            rpt.Site = this.Site;
            return(rpt);
        }
コード例 #2
0
ファイル: students_form.cs プロジェクト: muntazir143/TaleemLo
        void reportGenerator()
        {
            //SqlCommand cmd = new SqlCommand(conn);
            //DataTable dataTable = new DataTable();
            SqlCommand     cmd     = new SqlCommand("select * from Students", conn);
            DataSet        dataSet = new DataSet();
            SqlDataAdapter adapter = new SqlDataAdapter(cmd);

            adapter.Fill(dataSet);
            //students_dgv.DataSource = dataTable;
            StudentsFormReport studentsFormReport = new StudentsFormReport();

            studentsFormReport.SetDataSource(dataSet);

            StudentFormReportViewer studentFormReportViewer = new StudentFormReportViewer();

            studentFormReportViewer.StudentReportViewer.ReportSource = studentsFormReport;
            studentFormReportViewer.ShowDialog();
        }