以文本方式查看主题 - Foxtable(狐表) (http://foxtable.net/bbs/index.asp) -- 专家坐堂 (http://foxtable.net/bbs/list.asp?boardid=2) ---- [求助]请教unverse关于收据打印参数代码【已解决】 (http://foxtable.net/bbs/dispbbs.asp?boardid=2&id=32754) |
-- 作者:lipiti -- 发布时间:2013/5/7 18:42:00 -- [求助]请教unverse关于收据打印参数代码【已解决】 [求助]请教unverse关于收据打印参数代码 以下代码有什么错误:系统会提示代码错误: kprq .Text = r ( "开票日期" ) Dim r As Row = Tables ("收据信息" ). Current With Tables ( "收据打印参数" ) Dim pyz As Integer = . rows (0 )( "整体偏移_X" ) \'取左偏移的值.... Dim pys As Integer = . rows (0 )( "整体偏移_Y" ) \'取上偏移的值.... Dim doc As New PrintDoc \'定义一个报表 Dim text As new prt .RenderText Doc .PrinterName = . Rows( 0 )("打印机" ) Doc .PageSetting . LeftMargin= 1 Doc .PageSetting . BottomMargin = 1 Doc .PageSetting . TopMargin= 1 Doc .PageSetting . LeftMargin = 1 doc .PageSetting . Width = val (.Rows ( 0)( "宽度" )) \'纸张宽度为100毫米 doc .PageSetting . Height = val (.Rows ( 0)( "高度" )) \'纸张高度为120毫米 \'---------------------------------- Dim skr As New prt .RenderText \'开票日期 kprq .Text = r ( "开票日期" ) kprq .X = val (. rows( 0 )("开票日期_X" )) + pyz kprq .y = val (. rows( 0 )("开票日期_Y" )) + pys doc .body .Children . Add( kprq ) \'---------------------------------- Dim skr As New prt .RenderText \'缴款单位 jkdw .Text = r ( "缴款单位或个人" ) jkdw .X = val (. rows( 0 )("缴款单位或个人_X" )) + pyz jkdw .y = val (. rows( 0 )("缴款单位或个人_Y" )) + pys doc .body .Children . Add( jkdw ) \'---------------------------------- Dim skr As New prt .RenderText \'款项内容 kxnr .Text = r ( "款项内容" ) kxnr .X = val (. rows( 0 )("款项内容_X" )) + pyz kxnr .y = val (. rows( 0 )("款项内容_Y" )) + pys doc .body .Children . Add( kxnr ) \'---------------------------------- Dim skr As New prt .RenderText \'款项其他内容 kxqtnr .Text = r ( "款项其他内容" ) kxqtnr .X = val (. rows( 0 )("款项其他内容_X" )) + pyz kxqtnr .y = val (. rows( 0 )("款项其他内容_Y" )) + pys doc .body .Children . Add( kxqtnr ) \'---------------------------------- Dim skr As New prt .RenderText \'收款方式 skfs .Text = r ( "收款方式" ) skfs .X = val (. rows( 0 )("收款方式_X" )) + pyz skfs .y = val (. rows( 0 )("收款方式_Y" )) + pys doc .body .Children . Add( skfs ) \'---------------------------------- Dim fksj1 As New prt .RenderText \' 收款金额 skje .Text = r ( "收款金额" ) skje .X = val (. rows( 0 )("收款金额_X" )) + pyz skje .y = val (. rows( 0 )("收款金额_Y" )) + pys doc .body .Children . Add( skje ) \'---------------------------------- Dim je As New prt .RenderText \'人民币大写 dxje .Style . Font = New Font ("宋体" , 12) dxje .Text = CUMoney ( r( "大写金额" )) dxje .X = val (. rows( 0 )("人民币大写_X" )) + pyz dxje .y = val (. rows( 0 )("人民币大写_Y" )) + pys doc .body .Children . Add( dxje ) \'---------------------------------- Dim skr As New prt .RenderText \'收款人 skr .Text = r ( "收款人" ) skr .X = val (. rows( 0 )("收款人_X" )) + pyz skr .y = val (. rows( 0 )("收款人_Y" )) + pys doc .body .Children . Add( skr ) \'---------------------------------- Dim skr As New prt .RenderText \'备注 bz .Text = r ( "备注") bz .X = val (. rows( 0 )("备注_X" )) + pyz bz .y = val (. rows( 0 )("备注_Y" )) + pys doc .body .Children . Add( bz ) doc .AutoRotate = False Doc .Print End With [此贴子已经被作者于2013-5-7 22:56:36编辑过]
|
-- 作者:Neha -- 发布时间:2013/5/7 20:37:00 -- ????Dim?skr?As?New?prt?.RenderText?\'开票日期 ????kprq?.Text?? =?r?(?"开票日期"?) ????kprq?.X?=?val?(.?rows(?0?)("开票日期_X"?)) +?pyz ????kprq?.y?=?val?(.?rows(?0?)("开票日期_Y"?)) +?pys ????doc?.body?.Children?.?Add(?kprq?) \'---------------------------------- 要么skr改成kprq,要么kprq改成skr。下面代码一样 |
-- 作者:lipiti -- 发布时间:2013/5/7 22:56:00 -- 谢谢 Neha 已解决! |