PT_Main ptm = new PT_Main(); conn.ConnectionString = ConfigurationManager.ConnectionStrings["MMS_JJ.Properties.Settings.MMSBOMConnectionString"].ToString(); string sql = "SELECT * From QRStore where BomTransactionID = '" + int.Parse(comboBox1.Text) + "' "; string sqlo = "SELECT * From QRStore where BomTransactionID = '" + int.Parse(comboBox2.Text) + "' "; string sqli = "SELECT * From QRStore where BomTransactionID = '" + int.Parse(comboBox3.Text) + "' "; DataSet ds = new DataSet(); DataSet dso = new DataSet(); DataSet dsi = new DataSet(); SqlDataAdapter adapter = new SqlDataAdapter(sql, conn); SqlDataAdapter adapter1 = new SqlDataAdapter(sqlo, conn); SqlDataAdapter adapter2 = new SqlDataAdapter(sqli, conn); var ncopies = Int32.Parse(trllyTextBox.Text); adapter.Fill(ds, "QRStore"); adapter1.Fill(dso, "QRStore"); adapter2.Fill(dsi, "QRStore"); ptm.Subreports[0].SetDataSource(ds.Tables["QRStore"]); ptm.Subreports[1].SetDataSource(dso.Tables["QRStore"]); ptm.Subreports[2].SetDataSource(dsi.Tables["QRStore"]); crystalReportViewer1.ReportSource = ptm; crystalReportViewer1.Refresh(); ptm.PrintToPrinter(Convert.ToInt32(trllyTextBox.Text),false,0,0);
var
This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)