Set a datasource to a report. Can be used with a report or folder
2000, 2005 (N), 2005 (I), 2008 (N), 2008 (I),2008r2(N), 2008r2(I), 2012(N), 2012(I), Azure
(N)=Native
(I)=Integrated
SetRptDS Report|Folder [/DS:Datasource] /C:Connection [/S]
Report Name of the report
Folder Name of the folder
[/DS:] Report Data source
/C: Server Data source
[/S] Recurse sub folders. Can only be used with folder.
Note: report and folder are mutually exclusive
If /DS: is not specified all data sources are changed in a report
Set a single report
Set report \sales\global data sources to \data source\UAT
SetRptDS \sales\global /c:\datasource\UAT
All reports in a folder
Set reports in folder \sales to have data source \data source\UAT
SetRptDS \sales /c:\datasource\UAT
All reports in a folder and sub folders
Set reports in folder \sales to have data source \data source\UAT
SetRptDS \sales\global /c:\datasource\UAT /S
Reports with multiple data sources. In the examples below it is assumed the report have data source names ds1 and ds2
Set single Report
Set report \sales\global. For the report ds1 change the data sources to \data source\UAT
SetRptDS \sales\global /c:\datasource\UAT /ds:ds1
All Reports in a folder
Set report data sources in folder \sales changing the report data source ds1 to have data source \data source\UAT
SetRptDS \sales /c:\datasource\UAT /ds:ds1
All reports in a folder and sub folder
Set report data sources in folder \sales changing the report data source ds1 to have data source \data source\UAT
SetRptDS \sales /c:\datasource\UAT /ds:ds1 /s
•If folder, report, data source name, has spaces this must be enclosed in quotes.
eg folder called global sales, data source called "\data source\uat"
SetRptDS "\global sales" /c:"\datasource\UAT" /ds:ds1 /s