June 18, 2008 at 1:15 pm
I have a user community that wants to see the DataSource Name of the DataSet that is used to populate the report.
The users can change the DataSource, of course, so, I need to dynamically read the DataSource Name (If that is possible)
Does anyone know how to do this?
Thanks,
Steve
June 23, 2008 at 4:55 am
The question is, how does the user change the datasource dynamically? This might give a clue as to how to show the datasource on the report.
Nigel West
UK
February 11, 2010 at 4:05 am
If @DataSourceName = 'DataSource1'
select [Server] + ' ;Initial Catalog='+[Database] as 'Server'
from DBA.dbo.Report_Connection
where ID = 108
Your select will return this: INFHO-SRV-FMSC ;Initial Catalog=DBname
@DataSource is a parameter in the report with Values, either read from a table OR Hard-coded
@server is a parameter which is hidden and uses the above script as default value
Dataline from DBA.dbo.Report_Connection reads as follows:
IDServer Database
108INFHO-SRV-FMSC DBname
Viewing 3 posts - 1 through 2 (of 2 total)
You must be logged in to reply to this topic. Login to reply