在使用FastReport报表打印的时候涉及到财务结算金额时,会用到大写,系统保存的都为数字,将数字转换为大写没有默认的系统内置函数,经过查阅资料,可通过对FastReport的页面设计代码修改实现:c#代码

using System;
using System.Collections;
using System.Collections.Generic;
using System.ComponentModel;
using System.Windows.Forms;
using System.Drawing;
using System.Data;
using FastReport;
using FastReport.Data;
using FastReport.Dialog;
using FastReport.Barcode;
using FastReport.Table;
using FastReport.Utils;
using System.Text.RegularExpressions; //首先引入命名空间

namespace FastReport
{
public class ReportScript
{
private string DaXie(decimal money)
{
string s =money.ToString("#L#E#D#C#K#E#D#C#J#E#D#C#I#E#D#C#H#E#D#C#G#E#D#C#F#E#D#C#.0B0A");
string d =Regex.Replace(s,@"((?<=-|^)[^1-9]*)|((?'z'0)[0A-E]*((?=[1-9])|(?'-z'(?=[F-L\.]|$))))|((?'b'[F-L])(?'z'0)[0A-L]*((?=[1-9])|(?'-z'(?=[\.]|$))))","${b}${z}");
return Regex.Replace(d,".",delegate(Match m){return"负元空零壹贰叁肆伍陆柒捌玖空空空空空空空分角拾佰仟万億兆京垓秭穰"[m.Value[0]-'-'].ToString();});
}
}
}

在使用的时候,报表绑定数据时 类似用 [DaXie([VW_TB_JieSuanDan.JieSuanMoney])] 元

效果如下:

FastReport报表金额数字转大写问题的更多相关文章

  1. 将金额数字转换为大写汉字的js函数

    //将金额数字转换为大写汉字的函数 function convertCurrency(money) { //汉字的数字 var cnNums = new Array('零', '壹', '贰', '叁 ...

  2. java 金额数字转换大写算法

    根据人民币大写金额规范,转换有几点要注意的: 阿拉伯数字中间有"0"时,中文大写金额中间可以只写一个"零"字.如¥1,409.50,应写成人民币壹仟肆佰零玖圆伍 ...

  3. C# 金额数字转中文的方法

    /// <summary> /// 金额数字转大写(带小数点) /// </summary> public static string PriceToCn(decimal pr ...

  4. C#小写数字金额转换成大写人民币金额的算法

    C#小写数字金额转换成大写人民币金额的算法 第一种方法: using System.Text.RegularExpressions;//首先引入命名空间 private string DaXie(st ...

  5. 【PHP】金额数字转换成大写形式

    <?php /*将数字金额转成大写*/ function num_to_upper($num) { $d = array('零','壹','贰','叁','肆','伍','陆','柒','捌', ...

  6. 用python实现把数字人民币金额转换成大写的脚本程序

    # -*- coding: utf-8 -*- def Num2MoneyFormat( change_number ): """ .转换数字为大写货币格式( forma ...

  7. FastReport报表控件使用技巧总结

    FastReport报表控件使用技巧总结 1.FastReport中如何访问报表中的对象? 可以使用FindObject方法. TfrxMemoView(frxReport1.FindObject(' ...

  8. Delphi FastReport报表常用方法

    Delphi FastReport报表常用方法   作者及来源: EasyPass - 博客园    收藏到→_→:   摘要: Delphi FastReport报表常用方法       点击这里! ...

  9. FastReport报表设计(仔细看)

    FastReport报表设计 2011-06-16 16:56:19|  分类: 系统开发|举报|字号 订阅     下载LOFTER我的照片书  |     目录 5.1 前言 5.2 基本概念及操 ...

  10. FastReport报表设计

    [转载]FastReport报表设计 (2012-10-24 20:37:26) 转载▼ 标签: 转载   原文地址:FastReport报表设计作者:小黑 FastReport报表设计 目录 5.1 ...

随机推荐

  1. Ubuntu之切换root用户提示认证失败

    出现认证失败(Authentication failure)的原因有两种,要么是密码输入错误,要么是新安装的系统还没有给root设置密码,,如果是后者,可以通过命令sudo passwd root进行 ...

  2. 用telnet远程连接linux系统

    环境,centos7.6 通过telnet进行远程登录的方法如下: 1.安装telnet,telnet-server,xinetd 检测是否安装telnet rpm -qa | grep telnet ...

  3. 远程过程调用失败0x800706be

    今天用数据库突然发生了<远程过程调用失败0x800706be>,参考一下网站解决 https://www.cnblogs.com/guohenghai/p/3533091.html 今天在 ...

  4. 直接使用Arrays.asList()转数组,转变类型实际为AbstractList

    1.直接将数组转换为list时List的类型为AbstractList public static void main(String[] args) { String[] arr = {"A ...

  5. 蓝桥杯训练赛二-1467 问题 F: 蓝桥杯基础练习VIP-完美的代价

    题目描述 回文串,是一种特殊的字符串,它从左往右读和从右往左读是一样的.小龙龙认为回文串才是完美的.现在给你一个串,它不一定是回文的,请你计算最少的交换次数使得该串变成一个完美的回文串.交换的定义是: ...

  6. Idea报错:Command line is too long.

    https://blog.csdn.net/qq_40682764/article/details/109215368 run–>edit configurations–>你的项目–> ...

  7. Django新版本报错问题解决

    在创建app的时候会报如下错误: python3 manage.py startapp test django.core.exceptions.ImproperlyConfigured: SQLite ...

  8. DCU-GPU

  9. windows使用问题(win10)

    常见问题 遇到修改文件夹名称被程序占用解决办法 1.ctrl+shift+esc进入任务管理器 2.打开性能-资源监视器 3.关联的句柄搜索框输入文件夹名称 4.搜查出来暂用文件夹程序选中右键将其关闭

  10. PNAS:微生物组分析揭示人类皮肤的独特性

    https://blog.csdn.net/woodcorpse/article/details/87989663