0

I have a SSRS multivalue parameter called @prmEstate which is a list of dates. The dataset to populate @prmEstate is

select distinct [forecast finish]
from table1

The [forecast finish] column contains some blank values. I want to be able to pass in or select the blank value at runtime so I can see only records have a blank [forecast finish] or include the blank value records in the select all records. The line in my main dataset is

    SELECT COL1, COL2 FROM TABLE2
    WHERE ([forecast finish] IN @prmEstate)

Any assistance is appreciated.

FoxyB
  • 41
  • 2
  • 3
  • 10
  • Are the records actually datetime colums? So when you say blank you mean null? Or are the dates varchar() and they really are empty strings? – Jesse Mar 28 '18 at 15:29
  • Yes, they are actually datetime columns. Blank means null, no data there at all. Thank you. – FoxyB Mar 28 '18 at 15:54
  • I see. Multivalue parameters do not allow null values. To solve this, I would add another parameter that is boolean and asks if you want to include null dates. Then in the query and the check in the where add (( @BooleanParam = 1 and table.date is null) or (@BooleanParam = 0 and table.date is not null)) – Jesse Mar 28 '18 at 20:46

0 Answers0