Print/Show Report Data Source

  • Our firm has three different environments for development - Test, QA, and Production. I have a number of production reports that I test between databases by temporarily selecting another SSRS data source (to a different database with the same schema) for that report. I would like to add a textbox to the SSRS report to indicate the data source name that is being used for the report (i.e. "Production", "Test"). I figured this would be easy, but I can't find it. I can only see the data set name, which does not provide me with what I need.

    Thanks in advance for the help!

    -Matt

  • I was not able to find a member in the globals collection that references the data source. This is probably because you can have multiple datasets in the report that use different data sources. While I don't have the code, the direction I would move toward would be to write a function in the code section of the Report Properties that captures the data source name and populates a parameter with it which you can then reference in a textbox on the report.

  • Actually, it's easier than that. Once you have a working report, you can add a parameter to the report, and use it in the connection string to switch environments. (This assumes you'd like to run the report from the same RS instance).

    Your parameter list would look something like:

    Development DEVDB

    Quality Assurance QADB

    Production PRODDB

    Of course, it can be much more sophisticated than that (I'd need to know exactly the differences in the connection details).

    On the Report heading, display the parameter display value.

    Ok?

Viewing 3 posts - 1 through 2 (of 2 total)

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