How to define report uppercase amount in FastReport
This article introduces how to define the capital amount of the report in FastReport. The content is very detailed. Interested friends can use it for reference. I hope it will be helpful to you.
When we design FastReport report, customers may need to show uppercase amount, so we can use the following method to design report.
First of all, the capital amount should be changed to use [tt] as the variable definition.
Then write the code in the text editor
Code:
Begin
Qianwei:=-2
Smallmonth:=formatfloat ('0.005, [QueryBody. "iamt"])
Dianweizhi: = pos ('.', Smallmonth)
Tt: =''
BigMonth:=''
Qian:=length (Smallmonth)
While qian > 0 do
Begin
If qiandianweizhi then
Begin
I:=copy (Smallmonth,qian,1)
If iTunes 1 'then wei1:=' one'
Else if iTunes 2 'then wei1:=' II'
Else if iTunes 3 'then wei1:=' 3'
Else if iTunes 4' then wei1:=' Restaurant
Else if iTunes 5' then wei1:=' Wu'
Else if iTunes 6 'then wei1:=' Land'
Else if iTunes 7 'then wei1:=' 7'
Else if iTunes 8' then wei1:=''
Else if iTunes 9 'then wei1:=' 9'
Else if iTunes'0' then wei1:=' zero'
If qianwei=-3 then qianwei1:='%'
Else if qianwei=-2 then qianwei1:=' score'
Else if qianwei=-1 then qianwei1:=' angle'
Else if qianwei=0 then qianwei1:=' Yuan'
Else if qianwei=1 then qianwei1:=' pick'
Else if qianwei=2 then qianwei1:=' hundred'
Else if qianwei=3 then qianwei1:=' thousand'
Else if qianwei=4 then qianwei1:=' ten thousand'
Else if qianwei=5 then qianwei1:=' pick'
Else if qianwei=6 then qianwei1:=' hundred'
Else if qianwei=7 then qianwei1:=' thousand'
Else if qianwei=8 then qianwei1:=' 100 million
Else if qianwei=9 then qianwei1:=' 10'
Else if qianwei=10 then qianwei1:=' hundred'
Else if qianwei=11 then qianwei1:=' thousand'
Inc (qianwei)
BigMonth: = wei1+qianwei1+BigMonth
End
Dec (qian)
End
Tt: = BigMonth
End
Follow the above method to get it done easily.
On how to define the capital amount of the report in FastReport to share here, I hope that the above content can be of some help to you, can learn more knowledge. If you think the article is good, you can share it for more people to see.