Dynamic Connection Strings in Reporting Services 2005

  • Hi,

    I got it works under Visual Studio 2005 but after I deployed the reports to the report server and tried to access the reports I got error "Can not make a connection to data source". Any suggestions would be appreciated. Thanks.

  • I found out that the parameters for the server name and database name, should be the first in the list with report parameters.

  • Thanks. But it is the only parameter that I have in the list. Of course I try to build a dynamic connection to all servers and everything works fine under my Visual Studio 2005 environment but I had no luck after deploying it to the report server.

  • Did you, on the Report Server, go to the properties of the report, Data Sources. On the section Connect Using I gave the credentials for Credentials stored securely in the report server

  • Eventhough I got the message saying "deployed successfully" there is no data source stored on the report server. I suspected may be because of the dynamic connection string or some kind of security problem here because I had no problem to deploy other reports. Of course they all have shared data source not a dynamic one.

  • It shouldn't be the dynamic data source. I have 5 reports with a dynamic data source deployed on two different server with no problems (so far).

  • Thanks for your help. I finally got it to work by selecting "the credential supplied by the user" and checking "Use as windows credentials when connecting to the data source check box." Thanks again. Happy Friday.

  • I am trying to show the reports to the users in the report viewer. I am passing the server name, database name, userid and password as parameters to the report viewer.

    In the report project I can pass them as parameters and it works perfectly, however when I get the report viewer involved I get the following message:

    The current action cannot be completed because the user data source credentials that are required to execute this report are not stored in the report server database. (rsInvalidDataSourceCredentialSetting)

    Does anyone have any ideas?

  • Hello guys, I am actaully in similar situation. I have multiple database to chose from. But my situation is , i will be passing my database name in the querystring of the report url. Because i already know which database the report has to look into. I tried steps given still i am getting the following error

    An error has occurred during report processing. (rsProcessingAborted)

    Cannot create a connection to data source 'DataSource1'. (rsErrorOpeningConnection)

    For more information about this error navigate to the report server on the local server machine, or enable remote errors

    Can anybody help me on this. I need this done badly and urgently.

    Thanks for help in advance

  • We have the smae issue. I dont pass the database name and credential in the URL but I do pass dynamic parameter values in it. The deploying is successful.

    The error message being received is :

    • An error has occurred during report processing. (rsProcessingAborted)

    o Cannot create a connection to data source 'SQLDatabase'. (rsErrorOpeningConnection)

    § For more information about this error navigate to the report server on the local server machine, or enable remote errors

    If anyone has found a workaround for this please let us know.

    Thanks.

  • Hello Swetha, I got this working. I am database credential as the report parameters. Sorry did not post my reply on this.

    What i did was.

    When you are creating the report i followed these steps

    1. Create the database connectionstring with the hardcoded value.(Data Source=1.1.1.10;Initial Catalog=Mydatabasename). Finish the query writing. So that you can test query returns right rows.

    2. Build and deploy with this connectionstring.

    3. Then change the connectionstring with the parameters value something like this

    (="data source=" & Parameters!Server.Value & ";initial catalog=" & Parameters!ClientName.Value)

    4. Just deploy it.

    5. Your report should work fine.

    And also add all the permissions necessary to access that server. ASP.net, IIS, database level permissions.

    I followed these steps and my report works fine now.

    Sorry for replying, But thanks for the ideas i got from this thread and the forum.

    Thanks

  • Hi Bilal,

    The article which you have posted on Dynamic Datasource has helped me in getting a good idea on how to do it..........

    I have done exactly what you have mentioned in the article......and after deploying, when I am viewing the report,its asking me to enter the server name and the database name....after entering the values, the report is generated......

    Is it possible to do this way:

    Lets say I am having 5-6 servers on my SQL SERVER and then there are around 7-8 databases under each server.....

    SO I want to see the report in dropdown values of server and database rather than entering values manually

    For the server, I will just assign 5 Non-Queried values in the report parameters window......

    and now what I want is, when I select any value from server dropdown box, I need to get the respective databases present on that server.....Is this possible???If so Can you give any suggestions of How to do it????

    Thanks,

  • Thanks for this post. It is EXACTLY what I need. But does anyone know if this works in SRS 2008? I am getting several errors depending on how I format my string, but none of them work so far. My current error is:

    An error has occurred during report processing. (rsProcessingAborted)

    Cannot create a connection to data source 'DataSource2'. (rsErrorOpeningConnection)

    Format of the initialization string does not conform to specification starting at index 32.

    Here is the connection string I am using for datasource:

    Data Source=server\instance ";initial catalog=man_"&Parameters!Database.Value

    Our database names are all xyz_***. I only want the user to have to enter the *** part of the db name not the xyz_ part; the first 3 letters; because they won't know it.

    TIA!!

    SunnyD

  • I'm having problems with this same issue under 2008. If somebody has this working can you share what the datasource looks like from Report Manager perspective?

    Here is what I see in the log file:

    library!ReportServer_0-18!1200!04/08/2009-09:37:58:: Call to GetPermissionsAction(/SYSPRO/Customer (Dynamic Data Base)).

    library!ReportServer_0-18!1200!04/08/2009-09:37:58:: Call to GetSystemPropertiesAction().

    library!ReportServer_0-18!1224!04/08/2009-09:37:58:: Call to GetPropertiesAction(/SYSPRO/Customer (Dynamic Data Base), PathBased).

    library!ReportServer_0-18!1200!04/08/2009-09:37:58:: Call to GetSystemPermissionsAction().

    library!ReportServer_0-18!1200!04/08/2009-09:37:58:: Call to GetPropertiesAction(/SYSPRO/Customer (Dynamic Data Base), PathBased).

    library!ReportServer_0-18!1200!04/08/2009-09:37:58:: Call to GetSystemPropertiesAction().

    library!ReportServer_0-18!5f4!04/08/2009-09:37:58:: i INFO: RenderForNewSession('/SYSPRO/Customer (Dynamic Data Base)')

    processing!ReportServer_0-18!5f4!04/08/2009-09:37:58:: e ERROR: Throwing Microsoft.ReportingServices.ReportProcessing.ReportProcessingException: Cannot create a connection to data source 'DataSource1'., ;

    Info: Microsoft.ReportingServices.ReportProcessing.ReportProcessingException: Cannot create a connection to data source 'DataSource1'. ---> System.ArgumentException: Keyword not supported: '"data source'.

    at System.Data.Common.DbConnectionOptions.ParseInternal(Hashtable parsetable, String connectionString, Boolean buildChain, Hashtable synonyms, Boolean firstKey)

    at System.Data.Common.DbConnectionOptions..ctor(String connectionString, Hashtable synonyms, Boolean useOdbcRules)

    at System.Data.SqlClient.SqlConnectionString..ctor(String connectionString)

    at System.Data.SqlClient.SqlConnectionFactory.CreateConnectionOptions(String connectionString, DbConnectionOptions previous)

    at System.Data.ProviderBase.DbConnectionFactory.GetConnectionPoolGroup(String connectionString, DbConnectionPoolGroupOptions poolOptions, DbConnectionOptions& userConnectionOptions)

    at System.Data.SqlClient.SqlConnection.ConnectionString_Set(String value)

    at Microsoft.ReportingServices.DataExtensions.ConnectionExtension.Open()

    at Microsoft.ReportingServices.DataExtensions.SqlConnectionWrapper.Open()

    at Microsoft.ReportingServices.OnDemandProcessing.RuntimeDataSource.OpenDataExtensionConnection(DataSource dataSourceObj, OnDemandProcessingContext pc, CreateDataExtensionInstance createDataExtensionInstance)

    --- End of inner exception stack trace ---

    processing!ReportServer_0-18!5f4!04/08/2009-09:37:58:: e ERROR: Data source 'DataSource1': An error has occurred. Details: Microsoft.ReportingServices.ReportProcessing.ReportProcessingException: Cannot create a connection to data source 'DataSource1'. ---> System.ArgumentException: Keyword not supported: '"data source'.

    processing!ReportServer_0-18!5f4!04/08/2009-09:37:58:: e ERROR: An exception has occurred in data source 'DataSource1'. Details: Microsoft.ReportingServices.ReportProcessing.ReportProcessingException: Cannot create a connection to data source 'DataSource1'. ---> System.ArgumentException: Keyword not supported: '"data source'.

    processing!ReportServer_0-18!5f4!04/08/2009-09:37:58:: i INFO: DataPrefetch abort handler called for Report with ID=. Aborting data sources ...

    processing!ReportServer_0-18!5f4!04/08/2009-09:37:58:: e ERROR: Throwing Microsoft.ReportingServices.ReportProcessing.ProcessingAbortedException: An error has occurred during report processing., ;

    Info: Microsoft.ReportingServices.ReportProcessing.ProcessingAbortedException: An error has occurred during report processing. ---> Microsoft.ReportingServices.ReportProcessing.ReportProcessingException: Cannot create a connection to data source 'DataSource1'. ---> System.ArgumentException: Keyword not supported: '"data source'.

    --- End of inner exception stack trace ---

    chunks!ReportServer_0-18!5f4!04/08/2009-09:37:58:: w WARN: Rolling back shared chunk transaction for snapshot '967c1063-ee98-4098-9d44-8fa387ef10d5', Permanent=False.

    library!ReportServer_0-18!5f4!04/08/2009-09:37:58:: w WARN: Microsoft.ReportingServices.ReportProcessing.ProcessingAbortedException: An error has occurred during report processing. ---> Microsoft.ReportingServices.ReportProcessing.ReportProcessingException: Cannot create a connection to data source 'DataSource1'. ---> System.ArgumentException: Keyword not supported: '"data source'.

    webserver!ReportServer_0-18!5f4!04/08/2009-09:37:58:: e ERROR: Reporting Services error Microsoft.ReportingServices.Diagnostics.Utilities.RSException: An error has occurred during report processing. ---> Microsoft.ReportingServices.ReportProcessing.ProcessingAbortedException: An error has occurred during report processing. ---> Microsoft.ReportingServices.ReportProcessing.ReportProcessingException: Cannot create a connection to data source 'DataSource1'. ---> System.ArgumentException: Keyword not supported: '"data source'.

    Thanks,

    Robert Haack

  • hi grkanth81

    did you get a the work around with this issue? i also have a similar situation where i have to develop a report which will display data from different servers and different database, all databases uses similar tables, views and storedproc and on the report should display grouped by each database name and i don't have to enter the server name as parameter cause i want to display everything

Viewing 15 posts - 31 through 45 (of 71 total)

You must be logged in to reply to this topic. Login to reply