Show/Hide Toolbars

Reporting Services CMD

Command: GetRptDS

 

Get datasource(s) for a report(s)

 

SSRS Version:

 

2000, 2005 (N), 2005 (I), 2008 (N), 2008 (I),2008r2(N), 2008r2(I), 2012(N), 2012(I), Azure

 

(N)=Native

(I)=Integrated

 

Syntax

 

Get data sources assigned to a report(s)

 

GetRptDS  Report|Folder [/S]

GetRptDS  /?

 

 

 

Parameters

 

   [/S]   Include Sub folders

 

 

 

Examples

 

to get the datasouces for a report

 

Getdatasource <report name>

 

eg. find the datasouces in a report called sales. In this example can see there are 2 data sources. Highlighted in red and blue

 

 

\>getrptds sales

 

 

Report: \sales

=============================

Report Datasource name: DataSource1

Server Datasource Name: \Data Sources\ds1

 

Report Datasource name: DataSource2

Server Datasource Name: \Data Sources\ds1

 

There are 2 datasources

 

Summary

=======

Reports found       : 1

Missing datasources : 0

 

 

 

 

 

 

Here is an example of a report where a data source is missing (highlighted in red).

 

You can see there are 2 data sources for the global sales report both do not have a data source linked.

 

 

 

Report: \sales\Report Project1\Global sales

=============================

Report Datasource name: DataSource1

Server Datasource Name: *** Not defined ***

 

Report Datasource name: DataSource2

Server Datasource Name: *** Not defined ***

 

There are 2 data sources

 

 

 

 

Remarks

 

Use /s to process all reports in the folder and sub folders.

There is a summary an the end to show how many reports are missing data sources. This can be used to quickly identify if there are any reports missing a data source.

Note if used with SSRS 2008r2 or later this will also show shared datasets

 

See Also

 

 

 GetDS                - List shared data sources.

 GetDSNoRpt        - List data sources not linked to a report

 GetRptDS        - List report data source (and shared dataset  for SSRS 2008r2)

 GetRptNoDS        - List reports with missing data sources (and shared dataset  for SSRS 2008r2)