请问老师下面代码如何1、合计金额转换成大写格式
2、日期转换成YYYY年MM月DD日
3、单价,金额列4舍5入保留2位小数
Dim doc As New PrintDoc '定义一个报表
Dim ra As New prt.RenderTable
doc.PageSetting.PaperKind = 9 '纸张类型改为A4
Dim x As Integer = 0 '定义水平偏移参数
Dim y As Integer = 0 '定义垂直偏移参数
Doc.PageSetting.LeftMargin = 0 '设置左边距
Doc.PageSetting.RightMargin = 0 '设置右边距
Doc.PageSetting.TopMargin = 0 '设置上边距
Doc.PageSetting.BottomMargin = 0 '设置下边距
doc.PageSetting.Landscape = False '横向打印
Dim rx As prt.RenderText '定义一个文本对象
Dim CurRow As Row = Tables("出货单").Current
rx = new prt.RenderText
rx.Text =Tables("出货单"). Current("日期") rx.x = 44
rx.y = 24
doc.body.Children.Add(rx)
rx = new prt.RenderText
rx.Text = " 出货单号: " & Tables("出货单").Current("出货单号")
rx.x = 25
rx.y = 18
doc.body.Children.Add(rx)
rx = new prt.RenderText
rx.Text = "合计 (小写) : ¥" & Tables("出货单").Current("金额")
rx.x = 130
rx.y = 101
doc.body.Children.Add(rx)
rx = new prt.RenderText
rx.Text = "合计金额 (大写) : " & Tables("出货单").Current ("金额")
rx.x = 25
rx.y = 101
doc.body.Children.Add(rx)
rx = new prt.RenderText
rx.Text = "出货人: "& Tables("出货单").Current("出货人")
rx.x = 25
rx.y = 117
doc.body.Children.Add(rx)
rx = new prt.RenderText
rx.Text = "顾客名称: "& Tables("出货单").Current("顾客名称")
rx.x = 25
rx.y = 30
doc.body.Children.Add(rx)
Dim rt As prt.RenderTable
rt = New prt.RenderTable
rt.Width = 170 '表宽为150毫米
rt.Height = 60 '表高为150毫米
rt.Rows.Count = 9 '设置行数
rt.Cols.Count = 5 '设置列数
rt.x=25
rt.y=38
rt.Cols(0).Width = 60
rt.Cols(1).Width = 17
rt.Cols(2).Width = 24
rt.Cols(3).Width = 25
rt.Cols(4).Width = 25
rt.Cells(0,0).Text = " 品名规格"
rt.Cells(0,1).Text = "单位"
rt.Cells(0,2).Text = "数量"
rt.Cells(0,3).Text = "单价"
rt.Cells(0,4).Text = "金额"
With Tables("fa piao.fa piao清单")
For r As Integer = 0 To .Rows.Count - 1 '遍历关联表每一行
rt.Cells(r+1,0).Text = .rows(r)("品名规格")
rt.Cells(r+1,1).Text = .rows(r)("单位")
rt.Cells(r+1,2).Text = .rows(r)("数量")
rt.Cells(r+1,3).Text = .rows(r)("单价")
rt.Cells(r+1,4).Text = .rows(r)("金额")
Next
End With
doc.Body.Children.Add(rt)
Doc.Preview() '预览报表