private void button3_Click(object sender, EventArgs e) { SqlConnection dbconnect = new SqlConnection(); string sql = null; dbconnect.ConnectionString = @"Data Source=JP-PC\SQLEXPRESS;Initial Catalog=FTSSCRIBETECH;Integrated Security=True;"; try { dbconnect.Open(); CrystalReport13 CR; CR = new CrystalReport13(); sql = "SELECT 'TRUSTID','SUM(UPLOADLNCNT)' FROM DCLIVEJOBS GROUP BY TRUSTID"; SqlDataAdapter sda = new SqlDataAdapter(sql, dbconnect); DataSet ds = new DataSet(); sda.Fill(ds, "DataSet1"); CR.SetDataSource(ds); crystalReportViewer1.ReportSource = CR; crystalReportViewer1.Refresh(); dbconnect.Close(); } catch (Exception ex) { MessageBox.Show(ex.Message); } }
var
This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)