以文本方式查看主题 - Foxtable(狐表) (http://foxtable.com/bbs/index.asp) -- 专家坐堂 (http://foxtable.com/bbs/list.asp?boardid=2) ---- [求助]专业报表的错误原因? (http://foxtable.com/bbs/dispbbs.asp?boardid=2&id=142602) |
||||
-- 作者:老鼠 -- 发布时间:2019/11/1 9:26:00 -- [求助]专业报表的错误原因? Dim doc As New PrintDoc \'定义一个报表 Dim rx As prt.RenderText \'定义一个文本对象 Dim CurRow As Row = Tables("票据明细").Current doc.PageSetting.Width = 176 \'纸张宽度为176毫米 doc.PageSetting.Height = 84 \'纸张高度为84毫米 Doc.PageSetting.LeftMargin = 0 \'设置左边距 Doc.PageSetting.RightMargin = 0 \'设置右边距 Doc.PageSetting.TopMargin = 0 \'设置上边距 Doc.PageSetting.BottomMargin = 0 \'设置下边距 doc.body.Children.Add(rx) rx = new prt.RenderText rx.Text = CurRow("出票日期").Year rx.Style.FontSize = 8 \'字体大小为8磅 rx.x = 62 rx.y = 13 doc.body.Children.Add(rx) rx = new prt.RenderText rx.Text = CurRow("出票日期").Month rx.Style.FontSize = 8 \'字体大小为8磅 rx.x = 80 rx.y = 13 doc.body.Children.Add(rx) rx = new prt.RenderText rx.Text = CurRow("出票日期").Day rx.Style.FontSize = 8 \'字体大小为8磅 rx.x = 91 rx.y = 13 rx = new prt.RenderText rx.Text = CurRow("出票单位名称") rx.Style.FontSize = 10 \'字体大小为8磅 rx.x = 33 rx.y = 18 rx = new prt.RenderText rx.Text = CurRow("出票人账号") rx.Style.FontSize = 12 \'字体大小为12磅 rx.x = 33 rx.y = 25 rx = new prt.RenderText rx.Text = CurRow("付款行名称") rx.Style.FontSize = 10 \'字体大小为10磅 rx.x = 33 rx.y = 32 rx = new prt.RenderText rx.Text = CurRow("收款人") rx.Style.FontSize = 10 \'字体大小为10磅 rx.x = 109 rx.y = 18 rx = new prt.RenderText rx.Text = CurRow("收款账号") rx.Style.FontSize = 12 \'字体大小为12磅 rx.x = 109 rx.y = 25 rx = new prt.RenderText rx.Text = CurRow("收款开户银行") rx.Style.FontSize = 10 \'字体大小为10磅 rx.x = 109 rx.y = 32 doc.body.Children.Add(rx) rx = new prt.RenderText rx.Text = CUMoney(CurRow("金额")) rx.Style.FontSize = 16 \'字体大小为16磅 rx.x = 27 rx.y = 40 doc.body.Children.Add(rx) If GetDigit(CurRow("金额"),8) > "" Then rx = new prt.RenderText rx.Text = GetDigit(CurRow("金额"),8) rx.x = 132 rx.y = 44 doc.body.Children.Add(rx) End If If GetDigit(CurRow("金额"),7) > "" Then rx = new prt.RenderText rx.Text = GetDigit(CurRow("金额"),7) rx.x = 136 rx.y = 44 doc.body.Children.Add(rx) End If If GetDigit(CurRow("金额"),6) > "" Then rx = new prt.RenderText rx.Text = GetDigit(CurRow("金额"),6) rx.x = 140 rx.y = 44 doc.body.Children.Add(rx) End If If GetDigit(CurRow("金额"),5) > "" Then rx = new prt.RenderText rx.Text = GetDigit(CurRow("金额"),5) rx.x = 144 rx.y = 44 doc.body.Children.Add(rx) End If rx = new prt.RenderText rx.Text = GetDigit(CurRow("金额"),4) rx.x = 147 rx.y = 44 doc.body.Children.Add(rx) rx = new prt.RenderText rx.Text = GetDigit(CurRow("金额"),3) rx.x = 151 rx.y = 44 doc.body.Children.Add(rx) rx = new prt.RenderText rx.Text = GetDigit(CurRow("金额"),2) rx.x = 155 rx.y = 44 doc.body.Children.Add(rx) rx = new prt.RenderText rx.Text = GetDigit(CurRow("金额"),1) rx.x = 159 rx.y = 44 doc.body.Children.Add(rx) rx = new prt.RenderText rx.Text = GetDigit(CurRow("金额"),0) rx.x = 163 rx.y = 44 doc.body.Children.Add(rx) \'将文本对象加入报表 Doc.Preview() \'预览报表 |
||||
-- 作者:老鼠 -- 发布时间:2019/11/1 9:32:00 --
这是具体应用实例! |
||||
-- 作者:有点蓝 -- 发布时间:2019/11/1 9:56:00 --
|