Show/Hide Toolbars

Reporting Services CMD

Command: SetRptParams

 

Set the default parameter value of a report

 

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

 

SetRptParams  Report /P:Parameter /V:Value /R

 

 

Parameters

 

  /P                Parameter Name

  /V                Parameter value(s)

 /R                Remove default value

 

 

Note  /V can have multiple values in a comma separated list.

 

 

Examples

 

set the Country parameter in the global sales report to England- notice the report has quotes as it has a space in the name

 

 setrptparams "global sales" /p:Country /v:England

 

 

 

Note the parameter name is case sensitive this will fail

 

 setrptparams "global sales" /p:country /v:England

 

 

set the Country parameter in the global sales report to England and France (assuming the Country Parameter is multi value)

notice the report has quotes as it has a space in the name

 

 setrptparams "global sales" /p:Country /v:England,France

 

 

set the Country parameter in the global sales report to England and Cape Verde (assuming the Country Parameter is multi value)

notice the report and parameter value Cape Verde has quotes as it has a space in the name

 

 setrptparams "global sales" /p:Country /v:"England,Cape Verde"

 

set the Country parameter in the global sales report to null

 

 setrptparams "global sales" /p:Country /v:#NULL#

 

 

 

Remove the Country parameter default value

 

 setrptparams "global sales" /p:Country /R

 

 

Remarks

 

Note the parameter name is case sensitive so if the parameter in the report is called Country and you set /p:country this will fail as 'C' should be in capitals.

#NULL# represents the null value. To set a parameter value to null use /v:#NULL#

 

See Also

 

GetRptParams        - Get report parameters

SetRptParams        - Set report parameter value.