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

namespace BongahCS
{
    public partial class rep2 : Form
    {
        DataSet2 d1 = new DataSet2();

        public rep2()
        {
            InitializeComponent();
        }

        private void rep2_Load(object sender, EventArgs e)
        {
            // TODO: This line of code loads data into the 'DataSet2.DataTable2' table. You can move, or remove it, as needed.
            this.DataTable2TableAdapter.Fill(this.DataSet2.DataTable2);
            FirstClass db = new FirstClass();
            db.cmd.CommandText = @"SELECT     tblContracts.ContractID, tblMelks.MetraZH, tblMelks.KarbariType, tblSanadsStatuse.sanadStatusDescript, tblContracts.RahgiriCode, 
                      tblContracts.SerialNumber             FROM         tblSanadsStatuse INNER JOIN tblMelks ON tblSanadsStatuse.sanadStatuseID = tblMelks.SanadStatus INNER JOIN
                      tblContracts ON tblMelks.MelkID = tblContracts.MelkID";
            SqlDataAdapter da = new SqlDataAdapter(db.cmd);
            da.Fill(d1, "DataTable2");
            DataTable2BindingSource.DataSource = d1;

            reportViewer1.SetDisplayMode(Microsoft.Reporting.WinForms.DisplayMode.PrintLayout);
            reportViewer1.ZoomMode = Microsoft.Reporting.WinForms.ZoomMode.Percent;
            reportViewer1.ZoomPercent = 25;
            this.reportViewer1.RefreshReport();
        }

        private void crystalReportViewer1_Load(object sender, EventArgs e)
        {

        }
    }
}