rave  做了个报表,报表中需要输出金额的大写。我原本想,直接在数据集中调用转大写函数的,但是,access好像不支持。哪路神仙能来帮帮忙。告诉我怎么才能实现rave报表中金额大写的输出啊?不知道rave的event  editor 能不能实现。我把转大写的函数放到 时间编辑器里面后,编译的时候提示 erro  #22 --unknown identifier[function]

解决方案 »

  1.   

    在给数据的时候,先做好再给不可以吗
    不用rave
      

  2.   

    就是在给数据的时候给不了啊、access根本不能调用函数
      

  3.   

    在ACESS字段中,加一个中文字段,呵呵显示中文金额.在显示报表的时候,用自己写的函数把中文金额得到,放到RAVE报表中指定显示位置去.用RAVE报表,呵呵没用过,不过有的报表做了扩展有这种转为中文的函数,不知道RAVE支持不支持了.
      

  4.   

    delphi下:function TForm1.Convert(money: real): string;
    var smallMode:string;
        bigChar,powerChar:string[2];
        power,dotPos,i:integer;
    begin
      power:=-2;
      smallMode:=FormatFloat('0.00',money);
      dotPos:=System.Pos('.',smallMode);
      for i:=length(smallMode) downto 1 do begin
        if i=dotPos then continue;
        case StrToInt(Copy(smallMode,i,1)) of
          1:bigChar:='壹';
          2:bigChar:='贰';
          3:bigChar:='叁';
          4:bigChar:='肆';
          5:bigChar:='伍';
          6:bigChar:='陆';
          7:bigChar:='柒';
          8:bigChar:='捌';
          9:bigChar:='玖';
          0:bigChar:='零';
          end;
        case power of
          -3:powerChar:='厘';
          -2:powerChar:='分';
          -1:powerChar:='角';
          0 :powerChar:='元';
          1,5,9 :powerChar:='拾';
          2,6,10:powerChar:='佰';
          3,7,11:powerChar:='千';
          4,12:powerChar:='万';
          8 :powerChar:='亿';
          end;
        Inc(power);
        Result:=bigChar+powerChar+Result;
        end;
    end;
    以上是转换的函数,可以调用该函数