private void btnShow_Click(object sender, EventArgs e) { try { dt = DBLayer.GetDailySummaryReport(DateTime.Parse(dtpDate.Text)); MCKJ.Reports.Accounts.DailySummaryReport.frmViewer frmViewer = new MCKJ.Reports.Accounts.DailySummaryReport.frmViewer(); rptDailySummaryReport rpt = new rptDailySummaryReport(); rpt.SetDataSource(dt); frmViewer.crystalReportViewer1.ReportSource = rpt; frmViewer.Show(); } catch (Exception ex) { MessageBox.Show("An unknown error occured:\n\n" + ex.Message, "Error", MessageBoxButtons.OK, MessageBoxIcon.Exclamation); } }