title: SSRS reference report variable from report function
body: <p>In SSRS, is it possible to reference a report variable from a report function?</p>
  
  <p>Below is my report function. Instead of declaring and setting the MaxRFWIDRange in the function, I'd rather reference a report variable with the same name.</p>
  
  <pre><code>Function ValidateRFWIDRange(FromRFW As Integer, ToRFW As Integer) As Boolean
  
      Dim DiffRFW As Integer
      Dim MaxRFWIDRange As Integer
      MaxRFWIDRange = 10000
      DiffRFW = ToRFW - FromRFW
  
      If DiffRFW &gt; MaxRFWIDRange Then
          Return False
      Else
          Return True
      End if
  End Function
  </code></pre>