Reports connection string RRS feed

  • Question

  • Hi, A quick question...


    I currently have a small application which accesses a database on a remote server. I currently store the connection string in the app.config file, but instead I want to store it embedded in my application.


    Is there anyway you can bind a report to a connection string that is not stored in the app.config file? I.E, pass each report a connection string....



    Wednesday, July 11, 2007 12:14 PM

All replies

  • Yes, there is, if I understand your question correctly.


    You can use an  expression as a datasource, as described here

    ... look for the section on "Data Source Expressions".  YOu need to read the section, but the basic thing is that the connectionstring can be an expression that looks like this:

    Code Snippet


    ="data source=" & Parameters!ServerName.Value & ";initial catalog=AdventureWorks"



    (I put that final quotation mark in, it's not in their example but it sure looks like it should be <g>)






    Thursday, July 12, 2007 2:03 PM