2
votes

I have a SSRS report parameter that is incorrectly defaulting to NULL (All), when I have the 'No default value' option selected. The parameter uses a stored procedure to load available values, and there are several values in my parameter drop-down-box.

Paramater Properties No Default Parameter Selected

When I view my report in preview mode or on the SSRS poral, my parameter is automatically set to All (NULL). What would make this happen?

The XML code shows no default values either:

<ReportParameters>
<ReportParameter Name="[My Parameter Name]">
  <DataType>Integer</DataType>
  <Nullable>true</Nullable>
  <Prompt>My Parameter</Prompt>
  <ValidValues>
    <DataSetReference>
      <DataSetName>MyDataSet</DataSetName>
      <ValueField>MyParameterID</ValueField>
      <LabelField>MyParameterName</LabelField>
    </DataSetReference>
  </ValidValues>
</ReportParameter>
1
This happens in Design/Preview, but when pushed to the SSRS Portal, the Null parameters will not be set to Null.SS_DBA
Thank you for your response @WEI_DBA. I pushed my change to the SSRS portal and the parameter is still beings set to NULL.Kyle Williamson
Just for sake of it could you check if that value is checked in the parameters pane in ssrs manager. Make sure it is not stuck - checked but disabled. You can also delete the report in the ssrs manager and redeploy to see if your parameters are refreshed correctly.Ross Bush
@RossBush - Could you explain what you mean? I have no default selected for my parameter when I open the file in SQL Server Report Builder or in Visual Studio. I have a screenshot of the parameter properties pane.Kyle Williamson
I have had some weird behavior while doing something that seemed straightforward but did not work while designing reports. In edge case situations clearing the old rdl file in the ssrs manager and redeploying the report solved my strange parameter problem. I cant say it will fix your problem, however, it could be something you could easily rule out.Ross Bush

1 Answers

2
votes

As some users stated in the comments, you must delete and redeploy the report to update parameter defaults. According to Microsoft this is a known issue:

Parameter defaults do not get updated when re-deploying existing reports. These either have to be updated manually or the reports deleted and re-deployed. The latter regenerates all report ID's (GUID's) and makes traking usage from the ExecutionLog more difficult.