Get a query from a shared datasets
On the same concept than extracting a query from a dataset conatined in a report, you can directly connect to a shared dataset and extract the query (or stored procedure). To extract the query or stored procedure from a shared dataset, you've the same two options than for a report: connect to a ReportingServer database through sql or parse a **rsd** file on a disk. In both cases, you need to specify the xml element *shared-dataset* in place of the typical xml element *query*. The attributes to define a *shared-dataset* are mostly the same than for a *report*. For a ReportingServer database connection, you need to define the *source*, *path* and the *name* of this shared-dataset. For a rsd file, the *path* and *name* are enough (and the extension .rsd can be skipped).