using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Windows.Forms;
using System.Data.SqlClient;

namespace Emdad
{
    public partial class Reportteam : Form
    {
        SqlConnection con = new SqlConnection("Data Source=.;Initial Catalog=emdad;Integrated Security=True");
        SqlCommand cmd = new SqlCommand();
        DataSet3 ds = new DataSet3();
        public Reportteam()
        {
            InitializeComponent();
        }

        private void button1_Click(object sender, EventArgs e)
        {
            ds.Clear();
            cmd.Connection = con;
            con.Open();
            cmd.CommandText = "select * from Team";
            cmd.ExecuteNonQuery();
            SqlDataAdapter da = new SqlDataAdapter();
            da.SelectCommand = cmd;
            da.Fill(ds, "t3");
            con.Close();
            CrystalReport31.SetDataSource(ds.Tables["t3"]);
            crystalReportViewer1.ReportSource = CrystalReport31;
        }
    }
}
