Failed to open the connection. Details: [Database Vendor Code:17] Failed to Open Connection. payments11 {D29B3531-EF7D-426E-B1DB-05CD2A63FA5F}.rpt Details : [Database Vendor Code:17]
private void Preview_Click(object sender, EventArgs e) { SqlConnection cnn; string connectionString = null; string sql = null; connectionString = @"Data Source=.\SQLEXPRESS;Initial Catalog=trydb_1;Integrated Security=True"; cnn = new SqlConnection(connectionString); cnn.Open(); sql = "SELECT ID,pay_id,date,custname,description,chqno,duedate,accname,amount FROM payments"; SqlDataAdapter dscmd = new SqlDataAdapter(sql, cnn); ReportDocument cryRpt = new ReportDocument(); cryRpt.Load(@"D:\Completing\WindowsFormsApplication1\payments11.rpt"); crystalReportViewer1.ReportSource = cryRpt; crystalReportViewer1.Refresh(); }
var
This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)