我有这样一个数字:100.00我想在fastreport中显示为:十万 万 千 百 十 元 角 分
0 0 0 1 0 0 0 0应该怎样做啊?我试过这样传参数进去,但是第一笔可以实现,第二笔资料却不会改变,还是用的原值:t_Amount := formatfloat('0##,##0.#0',strtoint(f_Amount));
t_pos :=pos('.',t_amount);
t_shiwan := copy(t_amount,t_pos-6,1);
t_wan := copy(t_amount,t_pos-5,1);
t_qian := copy(t_amount,t_pos-4,1);
t_bai := copy(t_amount,t_pos-3,1);
t_shi := copy(t_amount,t_pos-2,1);
t_yuan := copy(t_amount,t_pos-1,1);
t_jiao := copy(t_amount,t_pos+1,1);
t_fen := copy(t_amount,t_pos+2,1);
0 0 0 1 0 0 0 0应该怎样做啊?我试过这样传参数进去,但是第一笔可以实现,第二笔资料却不会改变,还是用的原值:t_Amount := formatfloat('0##,##0.#0',strtoint(f_Amount));
t_pos :=pos('.',t_amount);
t_shiwan := copy(t_amount,t_pos-6,1);
t_wan := copy(t_amount,t_pos-5,1);
t_qian := copy(t_amount,t_pos-4,1);
t_bai := copy(t_amount,t_pos-3,1);
t_shi := copy(t_amount,t_pos-2,1);
t_yuan := copy(t_amount,t_pos-1,1);
t_jiao := copy(t_amount,t_pos+1,1);
t_fen := copy(t_amount,t_pos+2,1);
t_Amount := formatfloat('0##,##0.#0',strtoint(f_Amount));
里面的逗号删掉
1 1 1 1 1 1 1 0怎么回事呢?begin Amount := [FORMATFLOAT('0####0.#0',[Adoreport."Amount"])];
showmessage(amount);
pos :=[pos('.',amount)];
shiwan := [copy(amount,pos-6,1)];
wan := [copy(amount,pos-5,1)];
qian := [copy(amount,pos-4,1)];
bai := [copy(amount,pos-3,1)];
shi := [copy(amount,pos-2,1)];
yuan := [copy(amount,pos-1,1)];
jiao := [copy(amount,pos+1,1)];
fen := [copy(amount,pos+2,1)];
end
begin
-----
end
不要用delphi里的函数名做你的变量名
而且你为什么都用[]括起来了呢?这样编译能通过么?把你处理部分的代码整个贴出来看看