The control version is:
----------
FastReport 3.23.12 Enterpise for d2006 (DeXter)
The settings are as follows:
----------
Function TJzpzEdit1.MoneyCn (mmje: Double): string;
Const
S1: string = '0, 1, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 3, 4 ';
S2: string = 'getting hundreds of millions of users to get hundreds of millions of users from baibai ';
Function StrTran (const S, s1, s2: string): string;
Begin
Result: = StringReplace (S, s1, s2, [rfReplaceAll]);
End;
Var
S, dx: string;
I, Len: Integer;
Begin
If mmje <0 then
Begin
Dx: = 'negative ';
Mmje: =-mmje;
End;
S: = Format ('%. 0f', [mmje * 100]);
Len: = Length (S );
For I: = 1 to Len do
Dx: = dx + Copy (s1, (Ord (S [I])-Ord ('0') * 2 + 1, 2) + Copy (s2, (Len-I)
* 2 + 1, 2 );
Dx: = StrTran (dx, '0', '0'), '0 ',
'0 '),
'Zero pick', 'zero '), 'zero angular', 'zero '), 'zero point', 'whole ');
Dx: = StrTran (dx, '0', '0'), '0 ',
'0 '),
'000000', '000000'), '000000', '000000'), 'zero meta', 'meta ');
If dx = 'shape' then
Result: = 'zero-yuan unival'
Else
Result: = StrTran (dx, 'billionaire, 'yi0'), 'zero', 'Integral ');
End;
//////////
Procedure TJzpzEdit1.FormCreate (Sender: TObject );
Begin
FrxReport1.AddFunction ('function MoneyCn (mmje: Double): String; ', 'myfunction', 'function that converts lowercase values to uppercase ');
End;
//////////
Function TJzpzEdit1.frxReport1UserFunction (const MethodName: string;
Var Params: Variant): Variant;
Begin
If UpperCase (MethodName) = UpperCase ('moneycn') then
Result: = MoneyCn (Params [0]);
End;
//////////
Call method in report
MoneyCn (50000000)