zoukankan      html  css  js  c++  java
  • FastReport调用Delphi中的自定义函数(人民币大写金额)mtm

    1. 在 FormCreate 中向FastReprot添加函数 (fPrint)窗口

    procedure TfPrint.FormCreate(Sender: TObject);
    
      frxReport1.AddFunction('function MoneySpeechC(pMoney: Currency): String;','Myfunction','人民币大写金额转换函数');
    
    end;

    2. 在FastReport用户函数事件中添加 OnUserFunction

    function TfPrint.frxReport1UserFunction(const MethodName: string; var Params: Variant): Variant;
    begin
    
      if UpperCase(MethodName) = UpperCase('MoneySpeechC') then
         Result := MoneySpeechC(Params[0]);
    
    end;

    3.     在FastReport , memo6 的 OnAfterData 事件中插入如下代码

    procedure Memo6OnAfterData(Sender: TfrxComponent);
    begin
    
       //-------
       memo6.text := MoneySpeechC(memo6.Value);
       
    end;


    -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------

  • 相关阅读:
    第二阶段团队绩效评分
    团队冲刺2.9
    团队冲刺2.8
    团队冲刺2.7
    团队冲刺2.6
    团队冲刺2.5
    项目总结以及事后诸葛亮会议
    做什么都队第二阶段绩效评估
    第二阶段冲刺第十天
    第二阶段冲刺第九天
  • 原文地址:https://www.cnblogs.com/karkash/p/3780365.html
Copyright © 2011-2022 走看看