Showing results for 
Search instead for 
Did you mean: 

Default Prompt Value

Former Member
0 Kudos


We have a requirement to pass previous month to the report if the user does not select any value in the prompt. Meaning the value needs to default with no selection but if there is selection then the value selected should be passed. We have Reporting month(string) in yyyy/mm format. Another problem is the month value displayed in the report is based on the reporting month selected. So If the value entered is null the report output doesnot display any data.

I tried using dynamic prompt by bringing getdate() as a separate query but the problem is it just defaults to the previous month and doesnt allow to any other as input.

Please let me know what you think I need to do.



Accepted Solutions (0)

Answers (1)

Answers (1)

Former Member
0 Kudos

If you are using a static string parameter for months then edit the parameter and in parameter options use default value as "Last Month". Now use the record selection like this

if {?Parameter}="Last Month" then

{month field}= month(currentdate)-1


{month field}={?Parameter}

if you are using numeric parameter then use default value 0 and use the same record selection but replace "Last Month" with 0.