0
votes

I would like to display the name of the data source used in my report, as a way to quickly identify the origin of the data.

I know I can display the name of an embedded datasource like this :

=DataSource("name").DataSourceReferenceString

However my report does not embed a datasource as I am using shared datasets.

Any ideas ? Am I "doing it wrong" ?

EDIT : The answers so far involve using the DataSources collection. The thing is... my report does not reference any data source whatsoever. It does reference a shared dataset, which itself references a data source. This approach allows me to change the data source of all my reports by editing the shared dataset. But I'm always open to better ideas.

2

2 Answers

0
votes

This might help u .It Represents the collection of data sources referenced from within the body of a report

 DataSources("name").Type

For detail explanation you can go through the link Using Global Collections in Expressions (Reporting Services)

0
votes

An expression like =DataSources!DataSource1.DataSourceReference returns a string value representing the name of a shared data source when applicable. If the data source in the expression is an embedded data source, the expression returns an empty string.