title: SSRS access built-in functions from report vb code
body: <p>I'm working on create a multilingual SSRS report for SQL Server 2008R2.
  To do that without external code and only get translation from DB, I need to use Lookup() built-in function in the section code of the report.<br>
  I have the following expression for textbox:
  </p>
  
  <pre><code>=LOOKUP("Rpt_0_Hello", Fields!Token.Value, Fields!Translation.Value, "DS_Translation")
  </code></pre>
  
  <p></p></p>
  
  <p>The goal is to reduce the complexity of expression for the textbox translation. I would like to get to the expression:</p>
  
  <pre><code>=Code.TrasT("Rpt_0_Hello")
  </code></pre>
  
  <p>I try to write a VB function like this:</p>
  
  <pre><code>Public Function TransT( Token as String )
     Lookup( Token
            ,Report.Fields!Token.Value
            ,Report.Fields!Translation.Value
            ,"DS_Translation")
  End Function
  </code></pre>
  
  <p>This code generate an error of "[BC30451]'Lookup' is not declared.".
  I found on the web to use "Report" object to get Report element like Fields.<br>
  Is there a way to reference "Lookup()"?</p>