Custom Function Registration

Stimulsoft Reports.WEB discussion
Post Reply
ColinDaly
Posts: 7
Joined: Fri Nov 11, 2011 3:44 am

Custom Function Registration

Post by ColinDaly »

Hi,

At present we are looking to add custom functions into the report designer to provide quick access to common functions when designing reports (using the web product). We are using the command 'StiFunctionsXmlParser.LoadFunctionsFromXml('pathtoxml')' to achieve this which appears to be working partially i.e. no errors are returned and if we manually type function names into an expression editor, i.e. {Test(xxx)}, then the function is called....however the function is not available for selection in the user interface (dictionary, expression editor etc) which is not very useful for our users. Are we missing something or is this a bug?

For reference the assemblies we are using are at version 2011.2.1100.0.

The XML we are using is:

Code: Select all


  
    
      Test
      Does a test init.
      Target.Reports.BLL.Designer.ReportFunctions.TestFunctions
      System.String
      A String value.
      System.String
      str
      date1 is the first DateTime value used in calculating the difference.
        
  
The class we are using for functions is:

Code: Select all

Namespace Designer.ReportFunctions

    ''' 
    ''' Class containing custom functions for testing purposes
    ''' 
    Public Class TestFunctions

        Public Shared Function Test(ByVal str As String) As String

            Return "Test Value"

        End Function

    End Class

End Namespace
Regards

Col
Alex K.
Posts: 6488
Joined: Thu Jul 29, 2010 2:37 am

Custom Function Registration

Post by Alex K. »

Hello,

Please see the sample on our knowledgebase:
http://stimulsoft.helpserve.com/index.p ... rticleid=4

Thank you.
Post Reply