Connection
I'm trying to change the connection string at run time this way:
private void calllogEnvsettings_DatabaseLogin(object sender, DatabaseLoginEventArgs e)
{
e.Connection.ConnectionString = my_connectionString;
}
But the report displays with the connection string within the Report file, not the new one? Do I have to set any thing in the report?? This is the full code;
private void button1_Click(object sender, EventArgs e)
{
string connectionString = "Connection string here..."; //I pass the correct connection here.
report1.Load("myreport.frx"); //load the report
report1.Show();
}
private void calllogEnvsettings_DatabaseLogin(object sender, DatabaseLoginEventArgs e)
{
e.Connection.ConnectionString = my_connectionString;
}
Is there is anything wrong here??
private void calllogEnvsettings_DatabaseLogin(object sender, DatabaseLoginEventArgs e)
{
e.Connection.ConnectionString = my_connectionString;
}
But the report displays with the connection string within the Report file, not the new one? Do I have to set any thing in the report?? This is the full code;
private void button1_Click(object sender, EventArgs e)
{
string connectionString = "Connection string here..."; //I pass the correct connection here.
report1.Load("myreport.frx"); //load the report
report1.Show();
}
private void calllogEnvsettings_DatabaseLogin(object sender, DatabaseLoginEventArgs e)
{
e.Connection.ConnectionString = my_connectionString;
}
Is there is anything wrong here??
Comments
That's my mistake, I will fix it in the next build. I've change the logic a bit, so you will need to change your code:
e.ConnectionString = my_connectionString;
When is the next build? or can I use (e.ConnectionString) now with the current build?
Thank you.