SQL Server Reporting Services (SSRS) – Dealing with multiple date ranges with the option of choosing NULL for the start and/or end date in SSRS Reports

select * from date_range_table
where

((@startdate1 IS NULL AND @enddate1 IS NULL)
OR (start_date1 >= @startdate1 AND start_date1 <= @enddate1)
OR (start_date1 >= @startdate1 AND @enddate1 IS NULL)
OR (@startdate1 IS NULL AND start_date1 <= @enddate1))

AND

((@startdate2 IS NULL 
Read the rest