PFrog
asked on
Shared data source details within a reporting services custom code function
I'm successfully querying my database from within a custom code function within an SSRS 2005 report.
My problem is that I'm hard coding the connection string within the function (System.Data.SqlClient.Sql Connection ) - I need to be able to use the same connection as the shared data source that the report uses. I could grab the details from a registry setting or some other work around, but for tidyness and simplicity I really want to get the code to seemlessly talk to the same database.
I either need to pass in the connection details as a parameter to the function, or get the details from within the function - either would be fine.
Anyone got any ideas?...
My problem is that I'm hard coding the connection string within the function (System.Data.SqlClient.Sql
I either need to pass in the connection details as a parameter to the function, or get the details from within the function - either would be fine.
Anyone got any ideas?...
ASKER
Thanks ved17nov, but that shows how to get what I already have - a static, hard coded connection string.
I'm trying to make the code dynamically set its own connection string to be the same as the shared data source.
I'm trying to make the code dynamically set its own connection string to be the same as the shared data source.
ASKER
I have to say, I don't think it is possible - however with the combined genius of all our experts I'm hoping someone will come up with something!
I can't help you outright. But if there is a way to hook into the reports security/connection try trawling through the Microsoft.ReportingService s namespace, I would expect an object or method in there to allow you to do it - after all it's what Reporting Services itself is going to be using.
Cheers
Chris
Cheers
Chris
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
No probs.
Cheers
Chris
Cheers
Chris
please just check it out this site may be help full for you.