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.
I have the following expression for textbox:
=LOOKUP("Rpt_0_Hello", Fields!Token.Value, Fields!Translation.Value, "DS_Translation")
The goal is to reduce the complexity of expression for the textbox translation. I would like to get to the expression:
=Code.TrasT("Rpt_0_Hello")
I try to write a VB function like this:
Public Function TransT( Token as String )
Lookup( Token
,Report.Fields!Token.Value
,Report.Fields!Translation.Value
,"DS_Translation")
End Function
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.
Is there a way to reference "Lookup()"?