Hi,
I have a report in an ASP.NET website that uses an SqlDatasource with stored procedure to get the data I require.
I create a pdf from the report on runtime, and what I'm trying to do is change the connectionstring on runtime.
I know I can add code to the constructor to get the connectionstring from the web.config, but this requires a fixed connectionstring name, and I don't want this.
I also know the Datasource is accessible, but I don't want to set the datasource, just the connectionstring
So what I'm looking for is a way to pass the connectionstring to the report somehow.
As a parameter won't work, however, since the parameters aren't set yet when the constructor is called.
Any ideas?
CJ
I have a report in an ASP.NET website that uses an SqlDatasource with stored procedure to get the data I require.
I create a pdf from the report on runtime, and what I'm trying to do is change the connectionstring on runtime.
I know I can add code to the constructor to get the connectionstring from the web.config, but this requires a fixed connectionstring name, and I don't want this.
I also know the Datasource is accessible, but I don't want to set the datasource, just the connectionstring
So what I'm looking for is a way to pass the connectionstring to the report somehow.
As a parameter won't work, however, since the parameters aren't set yet when the constructor is called.
Any ideas?
CJ