Пример #1
0
        private void btnViewSemReport_Click(object sender, EventArgs e)
        {
            try
            {
                DataTable     dt = new DataTable();
                systemManager objsystemManager = new systemManager();
                dt = objsystemManager.ViewSemestersData();

                if (dt != null && dt.Rows.Count > 0)
                {
                    ReportDocument     rptDoc = new ReportDocument();
                    rptSemesterDetails rpt    = new rptSemesterDetails();
                    rptDoc = rpt;
                    rptDoc.SetDataSource(dt);
                    frmReportViewer objfrmReportViewer = new frmReportViewer(rptDoc);
                    objfrmReportViewer.Show();
                }
                else
                {
                    MessageBox.Show("No Records");
                }
            }
            catch (Exception ex)
            {
                throw ex;
            }
        }