FastReport报表金额数字转大写问题
在使用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报表金额数字转大写问题的更多相关文章
- 将金额数字转换为大写汉字的js函数
//将金额数字转换为大写汉字的函数 function convertCurrency(money) { //汉字的数字 var cnNums = new Array('零', '壹', '贰', '叁 ...
- java 金额数字转换大写算法
根据人民币大写金额规范,转换有几点要注意的: 阿拉伯数字中间有"0"时,中文大写金额中间可以只写一个"零"字.如¥1,409.50,应写成人民币壹仟肆佰零玖圆伍 ...
- C# 金额数字转中文的方法
/// <summary> /// 金额数字转大写(带小数点) /// </summary> public static string PriceToCn(decimal pr ...
- C#小写数字金额转换成大写人民币金额的算法
C#小写数字金额转换成大写人民币金额的算法 第一种方法: using System.Text.RegularExpressions;//首先引入命名空间 private string DaXie(st ...
- 【PHP】金额数字转换成大写形式
<?php /*将数字金额转成大写*/ function num_to_upper($num) { $d = array('零','壹','贰','叁','肆','伍','陆','柒','捌', ...
- 用python实现把数字人民币金额转换成大写的脚本程序
# -*- coding: utf-8 -*- def Num2MoneyFormat( change_number ): """ .转换数字为大写货币格式( forma ...
- FastReport报表控件使用技巧总结
FastReport报表控件使用技巧总结 1.FastReport中如何访问报表中的对象? 可以使用FindObject方法. TfrxMemoView(frxReport1.FindObject(' ...
- Delphi FastReport报表常用方法
Delphi FastReport报表常用方法 作者及来源: EasyPass - 博客园 收藏到→_→: 摘要: Delphi FastReport报表常用方法 点击这里! ...
- FastReport报表设计(仔细看)
FastReport报表设计 2011-06-16 16:56:19| 分类: 系统开发|举报|字号 订阅 下载LOFTER我的照片书 | 目录 5.1 前言 5.2 基本概念及操 ...
- FastReport报表设计
[转载]FastReport报表设计 (2012-10-24 20:37:26) 转载▼ 标签: 转载 原文地址:FastReport报表设计作者:小黑 FastReport报表设计 目录 5.1 ...
随机推荐
- Eclipse编程工具的使用( for Jave EE )
一.下载安装 Eclipse IDE for Java EE Developers 1.1 下载 官方下载:https://www.eclipse.org/downloads/ 推荐下载2021-09 ...
- pytest学习总结
官方pytest文档:Full pytest documentation - pytest documentation 一.pytest以及辅助插件的安装 1.pytest安装 pip install ...
- -behaviour()的使用,他具体有什么作用
Eralng 编程中的OTP OTP里面创建进程时 常用有四大behaviour • supervisor • gen_server • gen_fsm • gen_event 在erlang的编译器 ...
- 网线接口调试,Android ADB网络调试!
ADB网络调试,网线接口调试 没有USB接口,照样可以调试,可通过网线接口调试步骤! 一.第一步连接WIFI 查看wifi 的IP win+R 键 打开运行 ,输入cmd 二.输入ipc ...
- django解决网站CORS前后端跨域问题
1.安装cors-headers⼯具 pip install django-cors-headers 2.安装cors-headers应⽤ # 注册应用 INSTALLED_APPS = [ 'd ...
- Hyper-v 安装openwrt
安装注意事项: 1.只能选一代,网卡可以使用新版2.网卡高级设置,MAC地址欺骗一定要选上,不选外部交换机不能上网.3.防火墙做wan口转发4.防火墙wan口,两个reject改为 accept . ...
- win10 右键文件夹卡死
遇到右键文件夹卡死的问题,网上查找尝试, 命令窗口输入如下命令: SFC/Scannow 还有个思路 ,360安全 软件大全下载一个右键管理软件删除多余无用的右键选项: 参考:https://answ ...
- python checklist
1. 常用模块:subprocess, requests, paramekio, traceback, argparse, numpy, pandas 2. 赋值传递和引用传递 python是赋值传递 ...
- Windows 10更新报错 0x8000ffff
Windows 10更新报错 0x8000ffff - Microsoft Community 那么您可用 "Windows 10 覆盖安装" 来修复,可参考以下步伐,连接里有视频 ...
- 更换CentOS的下载源为阿里云
阿里Linux镜像地址:http://mirrors.aliyun.com/ 1.备份mv /etc/yum.repos.d/CentOS-Base.repo /etc/yum.repos.d/Cen ...