title: Replacing a parameter in 2008 R2 SSRS
body: <p>I am using SSRS 2008 R2 and report builder 3.0.  I have a cascading report issue that I need assistance with.  The first report runs fine.  Clicking on a link in the report passes a @processID parameter to the follow up report.  </p>
  
  <p>Now, when running the query with a string instead of the parameter directly in SSMS it takes under 1 second.  When I run it through SSRS with the parameter it takes about 15 minutes.  I've read that SSRS doesn't handle parameters very well.  What I would like to do is find a way to change the parameter into a string and then send that or if anyone knows of a better way.</p>
  
  <p>Below is the query the report is running:</p>
  
  <pre><code>SELECT     ResultDetail_View.processOid, ResultDetail_View.applicationId, outputItem.outputValue, ResultDetail_View.startTime, ResultDetail_View.resultStatus, 
                        ResultDetail_View.statusMessage, ResultDetail_View.endTime, ResultDetail_View.ErrRec, COUNT(Summary.Id) AS SumRec
  
  FROM         ResultDetail_View LEFT OUTER JOIN
                        Summary ON ResultDetail_View.processOid = Summary.Id LEFT OUTER JOIN
                        outputItem ON ResultDetail_View.outputOid = outputItem.outputItemOid
  
  GROUP BY ResultDetail_View.processOid, ResultDetail_View.applicationId, outputItem.outputValue, ResultDetail_View.startTime, ResultDetail_View.resultStatus, 
                        ResultDetail_View.statusMessage, ResultDetail_View.endTime, ResultDetail_View.ErrRec
  
  HAVING      (ResultDetail_View.processOid = @processID)
  
  ORDER BY ResultDetail_View.startTime
  </code></pre>