none
Embed a Function in .rdlc RRS feed

  • Question

  •  

    I'm working in VS2005.  I want to include a VB.NET embedded function in my .rdlc report.  Where does the function get placed exactly?  I'm going to set up the Value property to call the function, but I need to know where to place the function so it can get called.  There's probably a super simple answer, I just don't know it...
    Friday, April 11, 2008 1:33 PM

Answers

  • When you open your report to the designer,  in the blank area around the report, right click, and choose properties.

     

    There will be a tab named "Code"    click on this, and you'll have a blank area that you can put your VB function in.

     

     

    To call this function use this expression

     

    =Code.MyFunctionName(Fields!MyThingToPass.Value,Fields!MyOtherThingToPass.Value)

     

     

    naturally "MyFunctionName"  is the name you give to the function

     

    and

     

    Fields!MyThingToPass  / Fields!MyOtherThingToPass  are just field names I made up

    Friday, April 11, 2008 1:56 PM

All replies

  • When you open your report to the designer,  in the blank area around the report, right click, and choose properties.

     

    There will be a tab named "Code"    click on this, and you'll have a blank area that you can put your VB function in.

     

     

    To call this function use this expression

     

    =Code.MyFunctionName(Fields!MyThingToPass.Value,Fields!MyOtherThingToPass.Value)

     

     

    naturally "MyFunctionName"  is the name you give to the function

     

    and

     

    Fields!MyThingToPass  / Fields!MyOtherThingToPass  are just field names I made up

    Friday, April 11, 2008 1:56 PM
  • Many thanks, Blast!!  I've been Googling for two days and couldn't find this simple answer!

     

    Friday, April 11, 2008 2:54 PM
  • no problem, I've been in that same spot, which is why I try to frequent this board and help people out with the report controls. Since the answers can be hard to find sometimes.   if you need more help, feel free to ask.

    Friday, April 11, 2008 2:57 PM
  • Blastv i need your help regarding my application which is using RDLC report i am using Visual Studio2008 and i want to open linked report within same iframe but when i clicked it open out of IFrame .I am stucked at this since many days i write the thread here but no one answer at that thread since 4days.Please if you know let me know.Thanks in advance
    Tuesday, October 9, 2012 6:18 AM