title: SSRS Parameter Default to select all
body: <p>I am currently have a Drug Name parameter that populates a list a drugs based on what stores are selected with the Store parameter.  The portion of the query below is what I am using for the dataset that populates the drug names.</p>
  
  <pre><code> alter procedure SSRSReporting.Parameters_Get
      @ParameterName varchar(100),
      @StoreKey varchar(max) = NULL
  
  as
  
  
      declare
          @ParameterNameLocal varchar(100),
          @StoreKeyLocal  varchar(max) = NULL
  
      select
          @ParameterNameLocal = @ParameterName,
          @StoreKeyLocal = @StoreKey
  
  else if @ParameterNameLocal = 'GPIName'
          begin
              declare
                  @StoreList table (StoreKey int)
  
              insert into @StoreList (StoreKey)
                  select
                      convert(int,Name) 
                  from 
                      SSRSReporting.SplitString (@StoreKeyLocal)
              select
                  'All GPIs' as 'Label',
                  null as 'Value',
                  0 as 'OrderBy'
  
              union
  
              select
                  DrugName as 'Label',
                  GPI as 'Value',
                  1 as 'OrderBy'
              from
                  Final.FactRXBusinessEffectiveDay fact
                      inner join @StoreList sl
                          on fact.StoreKey = sl.StoreKey
                      inner join Final.DimDrug drug
                          on fact.DrugKey = drug.DrugKey and drug.DEAClass &lt;&gt; 'No DEA Class'
              order by
                  'OrderBy',
                  'Label'
          end 
  </code></pre>
  
  <p>The main dataset contains the following code related to the Drug Name</p>
  
  <pre><code>declare @GPINameTable table
  (
      GPI varchar(max)
  )
  
  if @GPINameLocal IS NOT NULL
  begin
      --Multiselect GPIs
      insert into @GPINameTable (GPI)
      select
          Name
      from
          SSRSReporting.SplitString (@GPINameLocal)       
  end
  
      where
          PharmTransDateKey between @StartDateLocal and @EndDateLocal
          and (@GPINameLocal is null or drug.GPI in (select GPI from @GPINameTable))
  </code></pre>
  
  <p>I currently have the Available and Default values for the Drug Name set to the Dataset that populates the drug name list.  I should also mention that the Drug List parameter needs to multi-select.</p>
  
  <p>The problem is that nothing is selected after I choose the stores and the list populates.  How would I default to Select All?</p>