关于用VFP解决Code128c条形码的打印问题
最近一直在网上查找,怎样打印code128的条形码。查了很多资料,得到的基本结论就是,code39可以用字库解决,前后加*号即可,code128c有点难,下载了code128的字库,可以打印,但扫描时是无法识别的,扫描枪识别不了,试卷扫描系统也识别不了(学生的准考证号是粘贴条码识别的),前面需要加开始符,末尾需要加验证符与结束符。[此贴子已经被作者于2023-6-13 10:31编辑过]
SET TALK OFF SET SAFE OFF CLOSE DATABASES ALL MESSAGEBOX("请先选择学生库",0+64,"条形码打印") filename = GETFILE() SELECT 考号, 姓名,学校,; SubStr(考号,9,2) AS 考场,; SubStr(考号,11,2) AS 座号,; 205 AS TXM0,; INT(IIF(VAL(SUBSTR(考号,1,2))<95,VAL(SUBSTR(考号,1,2))+32,VAL(SUBSTR(考号,1,2))+100)) AS TXM1,; INT(IIF(VAL(SUBSTR(考号,3,2))<95,VAL(SUBSTR(考号,3,2))+32,VAL(SUBSTR(考号,3,2))+100)) AS TXM2,; INT(IIF(VAL(SUBSTR(考号,5,2))<95,VAL(SUBSTR(考号,5,2))+32,VAL(SUBSTR(考号,5,2))+100)) AS TXM3,; INT(IIF(VAL(SUBSTR(考号,7,2))<95,VAL(SUBSTR(考号,7,2))+32,VAL(SUBSTR(考号,7,2))+100)) AS TXM4,; INT(IIF(VAL(SUBSTR(考号,9,2))<95,VAL(SUBSTR(考号,9,2))+32,VAL(SUBSTR(考号,9,2))+100)) AS TXM5,; INT(IIF(VAL(SUBSTR(考号,11,2))<95,VAL(SUBSTR(考号,11,2))+32,VAL(SUBSTR(考号,11,2))+100)) AS TXM6,; INT(IIF(MOD(105+VAL(SUBSTR(考号,1,2))*1+VAL(SUBSTR(考号,3,2))*2+VAL(SUBSTR(考号,5,2))*3+VAL(SUBSTR(考号,7,2))*4+VAL(SUBSTR(考号,9,2))*5+VAL(SUBSTR(考号,11,2))*6,103)<95,; MOD(105+VAL(SUBSTR(考号,1,2))*1+VAL(SUBSTR(考号,3,2))*2+VAL(SUBSTR(考号,5,2))*3+VAL(SUBSTR(考号,7,2))*4+VAL(SUBSTR(考号,9,2))*5+VAL(SUBSTR(考号,11,2))*6,103)+32,; MOD(105+VAL(SUBSTR(考号,1,2))*1+VAL(SUBSTR(考号,3,2))*2+VAL(SUBSTR(考号,5,2))*3+VAL(SUBSTR(考号,7,2))*4+VAL(SUBSTR(考号,9,2))*5+VAL(SUBSTR(考号,11,2))*6,103)+100)) AS TXM7,; 206 AS TXM8; FROM &filename INTO TABLE DBF\TXM.DBF REPORT FORM DBF\TXMDY preview
[此贴子已经被作者于2023-6-13 10:45编辑过]