title: Making a filter parameter optional
body: <p>I am using SSRS 2005. I created a report parameter named icVar. What should i do to allow this filter to be optional. Meaning if user enter something into the textbox, will display result according to what is entered but if nothing is entered it will just treat it to display all. This is the query in my dataset.</p>
  
  <pre><code>SELECT PASS_M, ENTRY_DT, EXIT_DT, WORKED_HRS, ACCESS_LOCATION_X, IC_N, COMPANY_M,  
  CONSECUTIVE_D
  FROM TEMP_TARGET
  WHERE (CONSECUTIVE_D &gt;= @consecDays) AND (ENTRY_DT BETWEEN @startDate AND @endDate) AND
  (ACCESS_LOCATION_X LIKE @accessVar) AND
  (IC_N LIKE @icVAr) 
  </code></pre>
  
  <p>I am making use of the wildcard % for my icVar. So if user input S123 for that filter the report will display result where IC_N values starting with S123... However when nothing is entered for that filter, do not force the user to input anything. It shall show IC_N Like %(means all) if nothing is entered.</p>
  
  <p>Any help is appreciated. Thanks.</p>