add function

Stimulsoft Reports.NET discussion
Post Reply
ytheaudin
Posts: 4
Joined: Sun Jul 12, 2009 5:05 pm
Location: Fr

add function

Post by ytheaudin »

Hi
I would like to add a function to the diction that user can simply use
whether you have an example I have already watched the howto but too complicated for the end user

best regards
HighAley
Posts: 8430
Joined: Wed Jun 08, 2011 7:40 am
Location: Stimulsoft Office

Re: add function

Post by HighAley »

Hello.
ytheaudin wrote:I would like to add a function to the diction that user can simply use
whether you have an example I have already watched the howto but too complicated for the end user
As a way you could create your function in the Code tab before the 'StiReport Designer generated code' region.

Thank you.
ytheaudin
Posts: 4
Joined: Sun Jul 12, 2009 5:05 pm
Location: Fr

Re: add function

Post by ytheaudin »

Hi
I tried this code
Test 1) Stimulsoft.Report.Dictionary.StiFunctions.AddFunction("ShowMessage", "dudu", "J+X", System.Type.GetType("String"), System.Type.GetType("String"), "test")
Test 2) Stimulsoft.Report.Dictionary.StiFunctions.AddFunction("dudu", "dudu", "J+X", System.Type.GetType("String"), System.Type.GetType("String"), "test")
StiReport1.Design()
And when I click on the design function object not defined error

Public Function dudu(ByVal test As String) As String
MsgBox(test)
Return test
End Function
End Class
Namespace MyFunction
Public Class Main
Public Function ShowMessage(ByVal text As String)
Return "dudu"
End Function
End Class
End Namespace

Have you an example?
Thanks
Alex K.
Posts: 6488
Joined: Thu Jul 29, 2010 2:37 am

Re: add function

Post by Alex K. »

Hello,

Please see the sample video:
http://www.stimulsoft.com/en/videos?tag ... ge=8&id=97

Thank you.
Post Reply