Bio
Ryan Duclos is a Senior Technical Consultant forĀ Perficient, Inc. (PRFT) on Microsoft Technologies. He lives in LA (Lower Alabama)! He loves spending time with his family, as well as being a Community Influencer. Ryan can be found at regional events as a Speaker/Attendee. Ryan has been working with Microsoft Technologies since 2000. Ryan organizes and attends area User Groups events on a regular basis, and speaks primarily on SQL topics..
Community Positions:
- LANUG (Lower AL .Net User Group) Program Director
- PSSUG (Pensacola SQL Server User Group) Event Coordinator
- Perficient, Inc. Southeastern Custom Application Development Practice Lead
You can find me:
Hi Ryan
I have just read your article ‘Ten Common SQL Server Reporting Services Challenges and Solutions’ – great article. I expect you’ll get lots of positive feedback about it!
I have an interesting challenge that I’d like to ask your opinion on. I work with a CRM system and use SSRS for the reports. The way I was taught/shown to write them was originally to use a datasource within the report. However when we make a copy of the database (call it test for example) then the reports no longer worked on test as the shared data source was pointing to live.
I found a work around for this by putting in what I call a ’switch’ into the report. This is done by going to the data source screen and changing it to a MS SQL server connection then putting a connection string of (for example)
=”data source=DEMO_LAPTOP_2\SQLEXPRESS;initial catalog=”&Parameters!strDatabaseName.Value &”"
I then create a report parameter that allows the user to select which database they want to run the report against. It all feels very clunky to me and really I want the report to run from the database it is ‘in’, but I guess Report Manager doesn’t know does it as it is sort of independant?
Any suggestions of how I could get the database passed through to the report without having to select it?
Thanks
Comment by Chris Sinclair | October 20, 2009
Chris,
Do you access your reports through Report Manager only or do you use an application or links? You can pass parameters on the links to your reports through an application or a link posted somewheres. Give me some more details on how you access your reports and I can show you further.
On my blog there is a “Box.net” widget for file downloads the “CanYouControlYourReports” has some source code in it and it shows how you can pass parameters to SSRS per rendering extension and your own report parameters. Here is the link to download the presentation and source http://www.box.net/shared/xhuuitt9nb.
Thank you,
Ryan Duclos
Comment by rduclos | October 28, 2009