Page 1 of 1

Custom Function Registration

Posted: Thu Jan 19, 2012 4:43 am
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

Custom Function Registration

Posted: Fri Jan 20, 2012 9:21 am
by Alex K.
Hello,

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

Thank you.