winform水晶报表使用code128条形码扫描打印
来源:互联网 发布:点对点带宽测试软件 编辑:程序博客网 时间:2024/05/21 04:43
http://hi.baidu.com/szwebman/item/1dec968783a7c019c216271b?qq-pf-to=pcqq.c2c
1、在水晶报表里,新建一个公式字段。点击【使用编辑器】之后弹出【公式工作室】。
2、在【公式工作室】中的【报表自定义函数】新建一个函数,在代码框中输入如下代码(VB代码):
Function fncGetCd128SetB ( strIn As string ) As String
Dim intLoop As Number
Dim intPosition as Number
Dim intTotalVal as Number
Dim strOut as String
Dim strSpChr as String
Dim strEndChr as String
Dim intEndNo as Number
strOut = ""
for intLoop = 0 to Len(strIn) - 1
intPosition = intLoop + 1
strSpChr = Mid(strIn, intPosition, 1)
intTotalVal = intTotalVal + (Asc(strSpChr) - 32) * intPosition
next
intTotalVal = intTotalVal + 104
intTotalVal = intTotalVal mod 103
If intTotalVal >= 95 Then
Select Case intTotalVal
Case 95
strEndChr = "Ã"
Case 96
strEndChr = "Ä"
Case 97
strEndChr = "Å"
Case 98
strEndChr = "Æ"
Case 99
strEndChr = "Ç"
Case 100
strEndChr = "È"
Case 101
strEndChr = "É"
Case 102
strEndChr = "Ê"
End Select
Else
intTotalVal = intTotalVal + 32
strEndChr = Chr(intTotalVal)
End If
fncGetCd128SetB = "Ì" + strIn + strEndChr + "Î"
End Function
选择【Basic语法】进行编译保存。
3、点击新建的公式字段,在自定义函数选择框内,选择刚新建的自定义函数。在【函数参数】的【值】中选择你要转换的数据库字段。
4、将公式字段拖动到报表设计视图之后检查字体类型是否为Code 128
- winform水晶报表使用code128条形码扫描打印
- 在水晶报表中使用Code128条形码
- 水晶报表 (Crystal Reports) code128 条形码 保存为PDF后 不显示条形码的 解决办法
- 【水晶报表】中如何打印条形码?
- 如何在水晶报表中添加条形码-winform ,c#.net
- 水晶报表 条形码
- 水晶报表条形码
- 使用 水晶报表 实现打印
- VS2005 winform中水晶报表简单使用
- 在Winform中使用水晶报表(Push)
- 如何在水晶报表中使用条形码……
- 如何在水晶报表中使用条形码……
- C# winform 条形码打印
- c#winform水晶报表
- 水晶报表中用Code128制作条型码的方法
- 水晶报表的打印
- 水晶报表打印
- 水晶报表 打印补丁
- [NHibernate] 入门实例 NHibernate 3.3 GA + VS2010 +MySQL
- 求职回顾
- Java日志框架:SLF4J,Common-Logging,Log4J,Logback说明
- 博客---学习
- SDGSDF1你总会在各种可能的解决方案当中选
- winform水晶报表使用code128条形码扫描打印
- imageView添加阴影和边框
- Android Path Time ScrollBar(Path 时间轴)
- 学习百度账户
- 设计模式入门之原型模式Prototype
- ajax请求一直出于请求状态,不返回的原因
- StringUtils详细介绍
- squid 源码学习2
- selectToUISlider