Custom functions

Stimulsoft Reports.Silverlight discussion
Locked
Lex Lavnikov
Posts: 34
Joined: Tue Nov 08, 2011 9:34 am
Location: Frankfurt

Custom functions

Post by Lex Lavnikov »

I need a custom function like this:

Change(string newText, string oldText)

which will just render HTML markup like this:

if (newText == oldText)
return newText;

return oldTextnewText

How can I implement something like this in Silverlight version?
I cannot find an interface point to register custom functions.

Using 2012.1 version
Alex K.
Posts: 6488
Joined: Thu Jul 29, 2010 2:37 am

Custom functions

Post by Alex K. »

Hello,

You can add own function only in Client/Server version. In native it is not possible because native version has not compilation.
As a way you can use Conditions for this task.

Thank you.
Lex Lavnikov
Posts: 34
Joined: Tue Nov 08, 2011 9:34 am
Location: Frankfurt

Custom functions

Post by Lex Lavnikov »

There is no need for compilation. Just provide an infrastructure to register custom functions like you do for built-in ones.

I've spent some time to see, how StiParser with StiAsm works, you just need to make it extendable, a dynamic list with custom functions (derived from your base class for example, specifying arguments types and count, result type), which programmer could derive from, implement custom logic and register them in some static class like StiFunction etc...

We could buy the source code and implement this on our own, but keeping this changes up-to-date with the evolving code is difficult. Anyway, this functional extensions could be a benefit for all customers of yours.
Alex K.
Posts: 6488
Joined: Thu Jul 29, 2010 2:37 am

Custom functions

Post by Alex K. »

Hello,

On the current moment, the parser does not process any code, but only specific tasks. We had the attempt to do opportunity to realize the idea of ​​parsing of "any" function, but until now this feature is not implemented yet. We have added this problem to the to-do list with the highest priority, and try to implement it within the next release. There are currently no alternatives to solve your problem.

Thank you.
Locked