public virtual CrystalDecisions.CrystalReports.Engine.ReportDocument CreateReport()
        {
            itemInformationReport rpt = new itemInformationReport();

            rpt.Site = this.Site;
            return(rpt);
        }
Example #2
0
 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();
     }
 }
        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();
            }
        }
 public virtual CrystalDecisions.CrystalReports.Engine.ReportDocument CreateReport()
 {
     itemInformationReport rpt = new itemInformationReport();
     rpt.Site = this.Site;
     return rpt;
 }