Page 1 of 1
Using method in Stimulsoft
Posted: Wed Jun 13, 2012 10:43 pm
by LeMinhChau
In the report, I want to use a method to execute a case. For example, In this case I want to read the amount to letter. Please tell me, how can to do it with stimulsoft. Thankyou very much!
ex: image attach
Using method in Stimulsoft
Posted: Thu Jun 14, 2012 2:05 am
by Alex K.
Hello,
Sorry, maybe we did not exactly understand your question. Could you explain your issue in more details?
Thank you.
Using method in Stimulsoft
Posted: Thu Jun 14, 2012 4:05 am
by LeMinhChau
I want to read number to words. I usually code in the code behind but I did not report stimulsoft do so is
Using method in Stimulsoft
Posted: Thu Jun 14, 2012 10:05 am
by Alex K.
Hello,
You can use the following function:
Totals.ToWords()
Thank you.
Using method in Stimulsoft
Posted: Thu Jun 14, 2012 9:31 pm
by LeMinhChau
Thanks for answer me. but I want to ask is how to be able to use a funtion on the report?
Ex:
I have a number as Total = 100;
I wanted to use function read money: "one hundred dollars". How to do?
I used to extrareport as follows:
In code behind I write:
txtText.Text = ReadMoney (txtTotal.Text);
ReadMoney() I built a function in the library
Using method in Stimulsoft
Posted: Fri Jun 15, 2012 5:16 am
by Alex K.
Hello,
In this case, you can use the following function:
ToCurrencyWords()
Thank you.
Using method in Stimulsoft
Posted: Fri Jun 15, 2012 11:02 pm
by LeMinhChau
Thankyou Aleksey reply for me!
But I want read money by Vietnamese. I have 1 function. Can i user it in stimulsoft report?
Using method in Stimulsoft
Posted: Sat Jun 16, 2012 8:02 pm
by Ivan
Hello,
You can write your function on the Code tab in the begin of report, for example:
Code: Select all
Namespace Reports
Public Class Report
Inherits Stimulsoft.Report.StiReport
Public Function GetCurrencyString(ByVal numToConvert As integer) As String
'
'Place your code here
'
Return "new currency string"
End Function
Public Sub New()
MyBase.New
Me.InitializeComponent
.....
and then use this function in expressions, for example:
Code: Select all
{GetCurrencyString(yourDataSource.Field)}
Thank you.