Click here to monitor SSC
SQLServerCentral is supported by Red Gate Software Ltd.
 
Log in  ::  Register  ::  Not logged in
 
 
 
        
Home       Members    Calendar    Who's On


Add to briefcase «««45678»»

Dynamic Connection Strings in Reporting Services 2005 Expand / Collapse
Author
Message
Posted Wednesday, April 7, 2010 8:53 AM


SSC Veteran

SSC VeteranSSC VeteranSSC VeteranSSC VeteranSSC VeteranSSC VeteranSSC VeteranSSC Veteran

Group: General Forum Members
Last Login: Tuesday, November 18, 2014 4:21 AM
Points: 229, Visits: 170
yes you can , but all teh sqls in data set shluld be stored procs. then u can pass username and password as a parameters to the report.

--------------------------------
Post #898596
Posted Monday, May 3, 2010 12:17 PM
Forum Newbie

Forum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum Newbie

Group: General Forum Members
Last Login: Wednesday, September 14, 2011 9:46 AM
Points: 8, Visits: 67
I found your article interesting and a great solution. I am testing it out and receive this error and cannot seem to implement a work-around.

An error has occurred during report processing.
Cannot create a connection to data source 'master'.
An error has occurred while establishing a connection to the server. When connecting to SQL Server 2005, this failure may be caused by the fact that under the default settings SQL Server does not allow remote connections. (provider: Named Pipes Provider, error: 40 - Could not open a connection to SQL Server)

Do you have any idea what is causing this error? I already checked the remote connectios and we do allow them against the test servers.
Post #914863
Posted Wednesday, November 16, 2011 9:24 AM
Forum Newbie

Forum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum Newbie

Group: General Forum Members
Last Login: Friday, July 6, 2012 6:07 AM
Points: 4, Visits: 24
Hey Crunchy...what did you do to get the database names into a dropdown? That is the only part that I am trying to make work.
Post #1206895
Posted Wednesday, November 23, 2011 9:33 AM
SSC Rookie

SSC RookieSSC RookieSSC RookieSSC RookieSSC RookieSSC RookieSSC RookieSSC Rookie

Group: General Forum Members
Last Login: Saturday, August 24, 2013 5:50 PM
Points: 49, Visits: 407
Anyone got it working with multiple values of parameter? I get this error:

"Error during processing of the ConnectString expression of datasource ‘xxx’."

conn string: ="Data Source=servername;Initial Catalog="+Parameters!CountryName.Value

For single value its working fine but foe multiple values its not working.

Any hint would be greatly appreciated!

Ankur
Post #1211155
Posted Wednesday, November 23, 2011 9:18 PM


SSC Veteran

SSC VeteranSSC VeteranSSC VeteranSSC VeteranSSC VeteranSSC VeteranSSC VeteranSSC Veteran

Group: General Forum Members
Last Login: Tuesday, November 18, 2014 4:21 AM
Points: 229, Visits: 170
ankurk2 (11/23/2011)
Anyone got it working with multiple values of parameter? I get this error:

"Error during processing of the ConnectString expression of datasource ‘xxx’."

conn string: ="Data Source=206.17.24.23;Initial Catalog="+Parameters!CountryName.Value

For single value its working fine but foe multiple values its not working.

Any hint would be greatly appreciated!

Ankur


Ankur,
you may use the following string for creating conneciton string

="Data Source=" & Parameters!ServerName.Value & ";Initial Catalog=" & Parameters!DBName.Value

we use Windows Authentication to connect , so the first parameter is for servername and second for databasename
this works.


Jeswanth


--------------------------------
Post #1211432
Posted Thursday, November 24, 2011 6:46 AM
SSC Rookie

SSC RookieSSC RookieSSC RookieSSC RookieSSC RookieSSC RookieSSC RookieSSC Rookie

Group: General Forum Members
Last Login: Saturday, August 24, 2013 5:50 PM
Points: 49, Visits: 407
HI Jeswanth,

Thanks for the reply!! Sorry to say but your method won't work. You are just making server name dynamic.
My question was can we select multiple values for parameter with that connection string.

As it is single connection string and it can take only one database at a time. And in your given string it can take only one server name and related database name.

I hope you understand now. Some1 has any idea about selecting multiple values for parameter. Please let me know.

Thanks
Post #1211608
Posted Friday, November 25, 2011 8:04 AM
Forum Newbie

Forum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum Newbie

Group: General Forum Members
Last Login: Monday, April 29, 2013 2:53 PM
Points: 6, Visits: 71
First things first. If you want to use Server Names in the drop down list then make a dataset which would populate your server names. and then create another dataset with servername as parameter and populate database names. Now your Stored Procedure should be written using execute sql command


SP_executesql N'servername+databasename+storedproc'

so now you will get the dropdown list populated which inturn would execute your stored proc on different servers.


remember if you have a query instead of SP then you need to have dynamic sql statements prepared.

let me know if you have any more questions
Post #1211980
Posted Monday, November 28, 2011 6:57 AM
Forum Newbie

Forum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum Newbie

Group: General Forum Members
Last Login: Friday, July 6, 2012 6:07 AM
Points: 4, Visits: 24
I am trying to statically set the Server and choose which database that I want to pull the reports from. Is that possible? And if so, is it possible to choose which db's that I want to use and restrict the list to those?
Post #1212469
Posted Monday, November 28, 2011 8:57 AM
SSC Rookie

SSC RookieSSC RookieSSC RookieSSC RookieSSC RookieSSC RookieSSC RookieSSC Rookie

Group: General Forum Members
Last Login: Saturday, August 24, 2013 5:50 PM
Points: 49, Visits: 407
I have few questions:
1. Are all databases in one server?
2. Do you want to select one database at a time or multiple?

Thanks
Post #1212565
Posted Monday, November 28, 2011 9:00 AM
Forum Newbie

Forum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum Newbie

Group: General Forum Members
Last Login: Friday, July 6, 2012 6:07 AM
Points: 4, Visits: 24
Hi Grasshopper,
All db's are on one server and I am only looking to access one of them at a time.
Post #1212568
« Prev Topic | Next Topic »

Add to briefcase «««45678»»

Permissions Expand / Collapse