public partial class FRM_RPT_CAR_ID : Form { int x; SqlConnection con = new SqlConnection("Server= .; Database= WhiteWhaleDB; Integrated Security = true"); SqlCommand sd; SqlDataReader sda; string s; public FRM_RPT_CAR_ID() { InitializeComponent(); } public FRM_RPT_CAR_ID(string x) { InitializeComponent(); this.x = int.Parse(x); } private void FRM_RPT_CAR_ID_Load(object sender, EventArgs e) { s = "select s1.Car_id, s1.Change_date , Service_Type.Servce_desc,s1.Current_dist, s1.Prev_distance as Prev_dist, (s1.Current_dist - s1.Prev_dist) as Change_dist ,s1.value_Tashhem as Value from Tashhem s1 INNER JOIN Service_Type ON s1.Servce_id = Service_Type.Servce_id where s1.Car_id" + x; DataSet1 ds = new DataSet1(); SqlDataAdapter dataAdapter = new SqlDataAdapter(s, con); dataAdapter.Fill(ds.Tables["Car_details"]); CrystalReport_Car_id report = new CrystalReport_Car_id(); report.SetDataSource(ds.Tables["Car_details"]); crystalReportViewer_Car_id.ReportSource = report; crystalReportViewer_Car_id.Refresh(); }
var
This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)