Show/Hide Toolbars

Reporting Services CMD

Command: CreateRpt

 

Create a report(s). Can be a single report or reports in a folder or reports in folder/sub folders

 

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

 

CreateRpt   [ReportFile] [/F:Folder] [/O]  [/h] [/D:Description] [/B[]:Folder]

CreateRpt   [-?] displays help

 

 

 

Parameters

 

[Report File]                Name of the RDL file to upload

[Folder]                Name of the folder to upload

[/F:Folder]              Location to deploy report. If this is not specified current folder is used

[/O]                      Overwrite report if it exists

[/h]                      Hide report

[/D:Description]          Description of report

[/B:Folder]            Backup original report before uploading new report

[/BO:Folder]            Backup original report and overwrite (if exists)

[/BD:Folder]            Backup original report to Folder\Date

                           If report exists the report created is report_<num>.rdl

[/BF:Folder]            Creates folder structure and backup original report

                           If report exists the report created is report_<num>.rdl

[/BFO:Folder]          Creates folder structure and backup original report overwrite backup file

[/BFD:Folder]            Creates folder structure+DATE and backup original report. If report exists the report created is report_<num>.rdl

[/BDF:Folder]            Creates folder DATE+structure and backup original report. If report exists the report created is report_<num>.rdl

[/S]                    Recurse sub folders only valid with Folder not file option

 

                               Note: The backup folder is created if it does not exist

 

Examples

 

 Upload single report

 

 The folder location on the report server is optional the current folder will be used.

 

 upload the report c:\UAT\sales.rdl to the current report folder

 

 createRpt c:\UAT\sales.rdl

 

 Note use /O to overwrite the report it already exists.

 

 

 

 Upload reports in folder /sub folders

 

 

Upload all reports from the folder c:\ssrsDeploy to the report server folder \ssrstst

 

 createRpt /f:\ssrstest c:\ssrsDeploy

 

 

 

Note the above example will not overwrite existing items. Use /O for overwrite

Upload all items from the folder c:\ssrsDeploy to the report server folder \ssrstst

 

 createRpt /f:\ssrstest c:\ssrsDeploy /o

 

 

 

 

Before overwriting you can backup existing items.

Upload all items from the folder c:\ssrsDeploy to the report server folder \ssrstst

backup existing items before overwriting on the report server use /b:<folder on PC>

 

Note if the backup item already exists it will not be overwritten but a new file created on the PC

eg sales.rdl file exists in the backup folder.

If this command is rerun there will be another file called sales-1.rdl.

Rerun again sales-2.rdl and so on

 

 createRpt /f:\ssrstest c:\ssrsDeploy /o /b:c:\backup

 

 

 

If you want to overwrite the item and not create multiple backup copies

use the command /bo:  (backup overwrite) not /b:

 

 createRpt /f:\ssrstest c:\ssrsDeploy /o /bo:c:\backup

 

 

 

If you want to upload all items in the folder and sub folders use /s

 

 createRpt /f:\ssrstest c:\ssrsDeploy /s

 

 

 

Recommended option to deploy and backup existing items use /s and /bf:

 

 createRpt /f:\ssrstest c:\ssrsDeploy /o /bf:c:\backup /s

 

 

 

 

Date time can also be added to the backup folder name

 

there are 2 options

 

1. foldername\<date>  (use /bfd = backup folder date)

 

         createRpt /f:\ssrstest c:\ssrsDeploy /o /bfd:c:\backup /s

 

 

 

2. <date>\foldername  (use /bdf = backup date folder)

 

         createRpt /f:\ssrstest c:\ssrsDeploy /o /bdf:c:\backup /s

 

 

 

 

Remarks

 

 

See Also

 

CreateAll                - Upload from disk one or more reports, models, data sources

CreateLinkRpt        - Create linked report

CreateModel        - Upload from disk one or more models

CreateDS                - Create data source

CreateRes                - Upload from disk one or more resources

CreateRpt                - Upload from disk one or more reports