I need to call a method to populate a textbox in a RDLC report. The function is contained in a seperate class within my web project. How do I reference the class so that my RDLC can see it. The class is named IMS.Foodservice.Functions, the function is
called RollUp(A, B).
From your description, it seems that you want to embedded a function in your rdlc report, right?
What you can add is only the VB functions. When you open your report to the designer, right click in the blank area of the report, and choose properties.
There will be a tab named "Code", just click on it, and you'll have a blank area that you can put your VB function in it.
I am aware of that and do it all the time however this is a situation where I need to call an external method due to its complexity. I am looking for a way to call a method / function that is contained in a class in the project.
Sorry for taking some time but I have been away. It seems that you are saying that in the RDLC you can use a Custom Assembly or write code in the RDLC code window.
Does this mean that you cannot reference a method in the web project that contains the RDLC? If you can how do you do it?
lblanton
Member
184 Points
100 Posts
Calling a public method from RDLC textbox
May 19, 2008 03:05 PM|LINK
I need to call a method to populate a textbox in a RDLC report. The function is contained in a seperate class within my web project. How do I reference the class so that my RDLC can see it. The class is named IMS.Foodservice.Functions, the function is called RollUp(A, B).
Thanks in advance for any assistance.
Nai-Dong Jin...
All-Star
41630 Points
3558 Posts
Re: Calling a public method from RDLC textbox
May 21, 2008 06:45 AM|LINK
Hi,
From your description, it seems that you want to embedded a function in your rdlc report, right?
What you can add is only the VB functions. When you open your report to the designer, right click in the blank area of the report, and choose properties.
There will be a tab named "Code", just click on it, and you'll have a blank area that you can put your VB function in it.
i.e. To call this function use this expression
=Code.MyFunctionName(Fields!MyField1.Value,Fields! MyField1.Value)Thanks.
lblanton
Member
184 Points
100 Posts
Re: Calling a public method from RDLC textbox
May 21, 2008 11:21 AM|LINK
Thanks,
I am aware of that and do it all the time however this is a situation where I need to call an external method due to its complexity. I am looking for a way to call a method / function that is contained in a class in the project.
Nai-Dong Jin...
All-Star
41630 Points
3558 Posts
Re: Calling a public method from RDLC textbox
May 22, 2008 03:27 AM|LINK
Well, sorry for misunderstanding. And what you want is to use custom assemblies or embedded code in Reporting Services, right?
You can try the following article, which is a step by step tutorial to call the functions which build in your custom assembly in reporting service.
http://support.microsoft.com/kb/920769/en-us
Thanks.
pareshjagati...
Member
516 Points
89 Posts
Re: Calling a public method from RDLC textbox
May 24, 2008 07:54 AM|LINK
Here's how you can have a custom assembly working in SSRS.
Using Custom Assembly in Sql Server Reporting Services (SSRS).
- Regards,
Paresh Jagatia
http://pareshjagatia.blogspot.com
lblanton
Member
184 Points
100 Posts
Re: Calling a public method from RDLC textbox
May 30, 2008 02:09 PM|LINK
Sorry for taking some time but I have been away. It seems that you are saying that in the RDLC you can use a Custom Assembly or write code in the RDLC code window. Does this mean that you cannot reference a method in the web project that contains the RDLC? If you can how do you do it?