Click here to monitor SSC
SQLServerCentral is supported by Redgate
 
Log in  ::  Register  ::  Not logged in
 
 
 


Dynamic Connection Strings in Reporting Services 2005


Dynamic Connection Strings in Reporting Services 2005

Author
Message
crunchycocktail
crunchycocktail
Forum Newbie
Forum Newbie (6 reputation)Forum Newbie (6 reputation)Forum Newbie (6 reputation)Forum Newbie (6 reputation)Forum Newbie (6 reputation)Forum Newbie (6 reputation)Forum Newbie (6 reputation)Forum Newbie (6 reputation)

Group: General Forum Members
Points: 6 Visits: 84
i have to use the dynamic connection string as it was shown in here and i have to get a list of database values if the user selects a particular server name and i tried to use exec sp_databases and in order to populate this data set i need to pass the connection string and the connection string does not have the database name in it so how can i get the list of the database names and give them as available values for the initial catalog parameter. i think you get my point but i really need to get this working. also i am concerned about how are we going to work with reports that share a same datasource. do we have to pass in the satasource for each report individually or is there a way out of that. any help would be apperciated. thanks
Robert Haack
Robert Haack
Forum Newbie
Forum Newbie (8 reputation)Forum Newbie (8 reputation)Forum Newbie (8 reputation)Forum Newbie (8 reputation)Forum Newbie (8 reputation)Forum Newbie (8 reputation)Forum Newbie (8 reputation)Forum Newbie (8 reputation)

Group: General Forum Members
Points: 8 Visits: 151
I believe you could connect to Master as the default database, run your query to get the list of databases to populate the drop down.
crunchycocktail
crunchycocktail
Forum Newbie
Forum Newbie (6 reputation)Forum Newbie (6 reputation)Forum Newbie (6 reputation)Forum Newbie (6 reputation)Forum Newbie (6 reputation)Forum Newbie (6 reputation)Forum Newbie (6 reputation)Forum Newbie (6 reputation)

Group: General Forum Members
Points: 6 Visits: 84
ok i have been able to get the database names by changing the connection string for the specific dataset but i would also like to get the dropdown list for the server names on the network. any idea
Robert Haack
Robert Haack
Forum Newbie
Forum Newbie (8 reputation)Forum Newbie (8 reputation)Forum Newbie (8 reputation)Forum Newbie (8 reputation)Forum Newbie (8 reputation)Forum Newbie (8 reputation)Forum Newbie (8 reputation)Forum Newbie (8 reputation)

Group: General Forum Members
Points: 8 Visits: 151
A couple questions:
1) Are you using Active directory?
2) Are you servers named in such a way that you can filter out which one's are SQL Servers and which ones are not?
Jeswanth Jaishanker
Jeswanth Jaishanker
SSC Veteran
SSC Veteran (230 reputation)SSC Veteran (230 reputation)SSC Veteran (230 reputation)SSC Veteran (230 reputation)SSC Veteran (230 reputation)SSC Veteran (230 reputation)SSC Veteran (230 reputation)SSC Veteran (230 reputation)

Group: General Forum Members
Points: 230 Visits: 172
Hi,
not sure where u want to load teh list of sql servers in a list box, if its supports .net language u can ue sql serevr smo and there are classes which will list the sql servers in LAN
Jeswanth

--------------------------------
crunchycocktail
crunchycocktail
Forum Newbie
Forum Newbie (6 reputation)Forum Newbie (6 reputation)Forum Newbie (6 reputation)Forum Newbie (6 reputation)Forum Newbie (6 reputation)Forum Newbie (6 reputation)Forum Newbie (6 reputation)Forum Newbie (6 reputation)

Group: General Forum Members
Points: 6 Visits: 84
i am trying work on a report with dynamic connection strings in ssrs2005. i was able to generate the list of the databases to use for the initial catalog= Databasename but i would like to know if we can generate the list of the servers using a query so that we can select the list of the servers. also i have a question with the username and password. when i try to give them dynamically it is not working for me. any guess.my main aim is to get the name of the server as available values for the data source = parameters!servername.value
Robert Haack
Robert Haack
Forum Newbie
Forum Newbie (8 reputation)Forum Newbie (8 reputation)Forum Newbie (8 reputation)Forum Newbie (8 reputation)Forum Newbie (8 reputation)Forum Newbie (8 reputation)Forum Newbie (8 reputation)Forum Newbie (8 reputation)

Group: General Forum Members
Points: 8 Visits: 151
There is no table is SQL Server that will give you this information unless you want to create and maintain a table with this information. Otherwise you need to look at some sort of query outside of SQL Server to get this information, like using AD to query all the computers in the domain, but even with that unless your computer names have a unique id to tell you that it's a SQL Server you are stuck. Jeswanth may have the better idea for you but not having ever used that method I can't validate it.
crunchycocktail
crunchycocktail
Forum Newbie
Forum Newbie (6 reputation)Forum Newbie (6 reputation)Forum Newbie (6 reputation)Forum Newbie (6 reputation)Forum Newbie (6 reputation)Forum Newbie (6 reputation)Forum Newbie (6 reputation)Forum Newbie (6 reputation)

Group: General Forum Members
Points: 6 Visits: 84
how about username and password are there any methods for dynamically allocating them. i am aksing you this in the context of having multiple datasets. i have 6 to 7 datasets each having same login id and password. so if i can use parameters for the username and password then it would be help full but 205 does not allow me to do that
Robert Haack
Robert Haack
Forum Newbie
Forum Newbie (8 reputation)Forum Newbie (8 reputation)Forum Newbie (8 reputation)Forum Newbie (8 reputation)Forum Newbie (8 reputation)Forum Newbie (8 reputation)Forum Newbie (8 reputation)Forum Newbie (8 reputation)

Group: General Forum Members
Points: 8 Visits: 151
If you are using Active Directory (AD) user accounts then this is easy, you just have the datasource use Windows Integrated Security. If you are not using AD then I suspose you could probably create some code to map the users AD account to a SQL Server account and have it logon automagically. Otherwise you could use "Credentials Stored Securely on the server" where you use a single user name and password for the data source and control access to the reports by user using the security tab under each report or folder.
Arshad Kalam
Arshad Kalam
Valued Member
Valued Member (67 reputation)Valued Member (67 reputation)Valued Member (67 reputation)Valued Member (67 reputation)Valued Member (67 reputation)Valued Member (67 reputation)Valued Member (67 reputation)Valued Member (67 reputation)

Group: General Forum Members
Points: 67 Visits: 29
Also, what if we don't know the credentials. can we dynamically supply the user and its password to the datasource?
Go


Permissions

You can't post new topics.
You can't post topic replies.
You can't post new polls.
You can't post replies to polls.
You can't edit your own topics.
You can't delete your own topics.
You can't edit other topics.
You can't delete other topics.
You can't edit your own posts.
You can't edit other posts.
You can't delete your own posts.
You can't delete other posts.
You can't post events.
You can't edit your own events.
You can't edit other events.
You can't delete your own events.
You can't delete other events.
You can't send private messages.
You can't send emails.
You can read topics.
You can't vote in polls.
You can't upload attachments.
You can download attachments.
You can't post HTML code.
You can't edit HTML code.
You can't post IFCode.
You can't post JavaScript.
You can post emoticons.
You can't post or upload images.

Select a forum

































































































































































SQLServerCentral


Search