hey there everyone.
so, have a c# windows form that uses crystal reports and a sql express backend and one crystal report that pulls from a remote sql server 08. when trying to pull from the local database, i get a ‘failed to open connection’ but the report loads fine from the remote connection.
everything works great on the development machine, it’s when testing on a virtual machine it fails. the DB on the virtual was created using a (current)backup of the develoment DB. here’s the code for the connection…
private void frm_cr_Visit_Load(object sender, EventArgs e)
{
this.Text = "Visit Report - Version:" + Application.ProductVersion;
Cursor.Current = Cursors.WaitCursor;
ReportDocument cryRpt = new ReportDocument();
cryRpt.Load(@"C:\Data\MRE\crVisitBySubVisitID.rpt");
cryRpt.SetDatabaseLogon("login", "password", @"localserver\sqlexpress", "DBname");
cryRpt.SetParameterValue("@VisitID", intVisitID);
cryRpt.SetParameterValue("@FullName", GlobalVariables.GlobalFullName);
crv.ReportSource = cryRpt;
crv.Refresh();
Cursor.Current = Cursors.Default;
}
all other DB functions within the program work. what causes the problem, and how do i fix it?
thanks!
dave k
found my problem, it had to do with the sql server being set up for only windows authentication, and not that and sql login authentication.
doh!