This is a migrated thread and some comments may be shown as answers.

User Functions in base classes?

5 Answers 239 Views
General Discussions
This is a migrated thread and some comments may be shown as answers.
Stephen McDaniel
Top achievements
Rank 1
Stephen McDaniel asked on 14 Apr 2008, 07:10 PM
Currently, it seems you can only use User Functions that are declared at the current report level.  All of the reports I make extend from a custom "BaseReport" (that itself extends from Telerik.Reporting.Report).  Within this BaseReport class I have static methods that I would like to use as User Functions.

Is there a way (without duplicating code in all my ancestor classes), to use methods in base classes as User Functions?

5 Answers, 1 is accepted

Sort by
0
Svetoslav
Telerik team
answered on 16 Apr 2008, 10:19 AM
Hello Stephen McDaniel,

I am afraid that the current version considers only the public static non-void methods of the report as user function and allows them to be used in the binding expression. We have plans to improve the whole data processing mechanism in one of the subsequent versions of the control, so we'll do our best to address this limitation as well.

Please excuse us for the temporary inconvenience.

Sincerely yours,
Svetoslav
the Telerik team

Instantly find answers to your questions at the new Telerik Support Center
0
Kevin
Top achievements
Rank 1
answered on 06 Mar 2010, 01:07 PM
Has there been any improvements in this area?  We are having to continually copy functions manually between reports.
0
Accepted
Massimiliano Bassili
Top achievements
Rank 1
answered on 08 Mar 2010, 09:27 AM
As you can see in the User Functions article (http://www.telerik.com/help/reporting/designing-report-user-functions.html), there are Assembly scoped user functions, so that you do not have to copy a function between reports, as long as they reside in the same assembly. This post is pretty old and that functionality has been available for quite some time now!

Cheers
0
Dan
Top achievements
Rank 1
answered on 08 Feb 2011, 11:31 PM
The above link does not appear to be valid.  Can you provide a valid link?
0
Steve
Telerik team
answered on 14 Feb 2011, 12:58 PM
Hello Dan,

Both the .chm help and online documentation have search available, so please use it to find what you are looking for. A quick search for "user functions" finds the correct link to this topic - User Functions

Regards,
Steve
the Telerik team
Get started with Telerik Reporting with numerous videos and detailed documentation.
Tags
General Discussions
Asked by
Stephen McDaniel
Top achievements
Rank 1
Answers by
Svetoslav
Telerik team
Kevin
Top achievements
Rank 1
Massimiliano Bassili
Top achievements
Rank 1
Dan
Top achievements
Rank 1
Steve
Telerik team
Share this question
or