private void itemInformationToolStripMenuItem_Click(object sender, EventArgs e) { try { con.Open(); SqlDataAdapter da = new SqlDataAdapter(); da.SelectCommand = new SqlCommand("select * from itemInfo", con); DataTable dt = new DataTable(); da.Fill(dt); itemInformationReport myreport = new itemInformationReport(); myreport.SetDataSource(dt); itemInformatonReportViews iirv = new itemInformatonReportViews(); iirv.crystalReportViewer1.ReportSource = myreport; iirv.Show(); } catch (Exception ex) { MessageBox.Show(ex.ToString(), "error!!", MessageBoxButtons.OK, MessageBoxIcon.Error); } finally { con.Close(); } }