How to call a public function from a vb module
Hi All, I have a simple function that I use in an SSRS report call XYZ. Currently I have this written in code tab of the report properties window, i.e. Report Menu > Report Properties > Code Tab > Function XYZ. I call this via =code.XYZ() However, I need to write a couple more functions and I don't want to have loads of text code here (messy). How can I call code from a VB module, as one would in Excel etc, to use in a report? Do I have to write anything different other than =code.xyz, like =code.module.xyz()? Does that make sense? Hope so! Thanks.
November 18th, 2010 11:30am

Hi, You would call the code as MyCustomAssembly.MyClass.MyFunction() The function MyFunction() is created in the class MyClass which is a part of the assembly MyAssembly. You will have to add a reference to this assembly in your SSRS report solution. When you write your custom code to an assembly, there are a few more things that you need to take care of (like changing the security in the SSRS policy and config files, etc.). Please go through this link, it would help you - http://bryantlikes.com/pages/824.aspx Let us know in case you still have any concerns. Cheers, ShalinShalin P. Kapadia
Free Windows Admin Tool Kit Click here and download it now
November 18th, 2010 12:32pm

Hi Shalin, Many thanks for your reply. That looks like a really good article, and I wasn't aware of the security issues. Will give it a read over now and get back to you if I need any more help! Thanks again. MZP.
November 18th, 2010 1:40pm

This topic is archived. No further replies will be accepted.

Other recent topics Other recent topics