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;
using CrystalDecisions.CrystalReports.Engine;
using CrystalDecisions.Shared;

namespace Ajans
{
    public partial class Form7 : Form
    {
        String StrComm = String.Empty;
        public Form7(String Q)
        {
            StrComm = Q;
            InitializeComponent();
        }

        private void Form7_Load(object sender, EventArgs e)
        {
            this.crystalReportViewer1.Refresh();

            Ra();           
        }

        private void Ra()
        {
            ReportDocument RD = new ReportDocument();
            string Path = Application.StartupPath;
            RD.Load(Path + "\\CrystalReport1.rpt");
            SqlDataAdapter DA = new SqlDataAdapter(StrComm, "SERVER=.;DATABASE=Havapeyma;Integrated Security=True");
            DataTable DT = new DataTable();
            DA.Fill(DT);
            RD.SetDataSource(DT);




            this.crystalReportViewer1.ReportSource = RD;
        }
    }
}
