title: SQL/SSRS CASE Statement parameter "pass-through"
body: <p>I've built a report using SSRS and it has a rather long CASE statement, for the purposes of displaying values clearly. What i need to do is be able "drill-down" into the report when the user clicks on the column containing the values in the CASE statement. This will then give a list of computers (with hardware details) that happen to have the item in the CASE statement. </p>
  
  <p>The problem i have is that the parameter that is been passed when the user clicks on the "drill-down" is the alias from the CASE statement rather than the actual value of the item in the CASE statement. Is there a way to pass through the actual value rather than the alias from the CASE statement? Apologies in advance, i'm a bit of a noob when it comes to this stuff.</p>
  
  <p>As requested, here is a little more detail using a sample CASE Statement;</p>
  
  <pre><code>SELECT
      CASE
          WHEN KeyName = 'banana' THEN 'Soft Fruit'
          WHEN KeyName = 'apple'  THEN 'Hard Fruit'
  </code></pre>
  
  <p>So when the user would run the report they would see either "Soft Fruit" or "Hard Fruit" in the column. Since the report i've created aggregates/counts up the number of hard fruit and soft fruit what i want to do is, lets say the Soft Fruit column contains 80 results. If the user clicks on this i want this to drill-down showing detailed information of those 80 results. The problem is that the drill-down parameter, KeyName, is passing the value "Soft Fruit" instead of passing the actual value, "banana". I hope that makes more sense.</p>
  
  <p>Thank you.</p>