Rss & SiteMap
Foxtable(狐表) http://www.foxtable.com
下载信息 [文件大小: 下载次数: ] | |
点击浏览该文件:汽车管理系统.rar |
下载信息 [文件大小: 下载次数: ] | |
点击浏览该文件:汽车管理系统.rar |
下载信息 [文件大小:38.5 KB 下载次数:18] | |
点击浏览该文件:汽车管理系统.rar |
多条记录一定要先筛选,再全选。
dim ss as integer
Dim dst As WinForm.DataList = e.Form.Controls("DataList1")
Dim drx as DataRow
For Index As Integer = 0 To dst.Count - 1
If dst.GetChecked(Index) Then
Dim dr As DataRow = dst.GetDataRow(Index)
dr("打印") = true
ss = dr("运费") + ss
drx = dst.GetDataRow(Index)
end if
next
Dim doc As New Printdoc
Dim rt As prt.RenderTable
rt = New prt.RenderTable
rt.Cells(0,0).Style.TextAlignHorz = prt.AlignHorzEnum.Center '水平居中
rt.Cells(1,0).Style.TextAlignHorz = prt.AlignHorzEnum.right '右
rt.Cells(0,0).SpanCols = 4
rt.Cells(1,0).SpanCols = 4
rt.Cols(0).Width = 28 '设第一列大小
rt.Cols(2).Width = 10
rt.Cells(0,0).Style.Font = New Font("宋体", 16, FontStyle.Bold) '设置字体
rt.CellStyle.Spacing.All = 3 '行与行之间的间隔
rt.rows(2).Style.Borders.left = New prt.LineDef '设表格左边线
rt.rows(3).Style.Borders.left = New prt.LineDef
rt.rows(4).Style.Borders.left = New prt.LineDef
rt.rows(5).Style.Borders.left = New prt.LineDef
rt.rows(6).Style.Borders.left = New prt.LineDef
rt.rows(7).Style.Borders.left = New prt.LineDef
rt.rows(2).Style.Borders.right = New prt.LineDef
rt.rows(3).Style.Borders.right = New prt.LineDef
rt.rows(4).Style.Borders.right = New prt.LineDef
rt.rows(5).Style.Borders.right = New prt.LineDef
rt.rows(6).Style.Borders.right = New prt.LineDef
rt.rows(7).Style.Borders.right = New prt.LineDef
rt.cells(2,1).Style.Borders.left = New prt.LineDef
rt.cells(3,1).Style.Borders.left = New prt.LineDef
rt.cells(4,1).Style.Borders.left = New prt.LineDef
rt.cells(5,1).Style.Borders.left = New prt.LineDef
rt.cells(6,1).Style.Borders.left = New prt.LineDef
rt.cells(7,1).Style.Borders.left = New prt.LineDef
rt.cells(2,2).Style.Borders.left = New prt.LineDef
rt.cells(3,2).Style.Borders.left = New prt.LineDef
rt.cells(4,2).Style.Borders.left = New prt.LineDef
rt.cells(5,2).Style.Borders.left = New prt.LineDef
rt.cells(6,2).Style.Borders.left = New prt.LineDef
rt.cells(7,2).Style.Borders.left = New prt.LineDef
rt.cells(2,3).Style.Borders.left = New prt.LineDef
rt.cells(3,3).Style.Borders.left = New prt.LineDef
rt.cells(4,3).Style.Borders.left = New prt.LineDef
rt.cells(5,3).Style.Borders.left = New prt.LineDef
rt.cells(6,3).Style.Borders.left = New prt.LineDef
rt.cells(7,3).Style.Borders.left = New prt.LineDef
rt.rows(2).Style.Borders.Top = New prt.LineDef
rt.rows(4).Style.Borders.Top = New prt.LineDef
rt.rows(6).Style.Borders.Top = New prt.LineDef
rt.rows(7).Style.Borders.bottom = New prt.LineDef
rt.Cells(0,0).Text = "货物运输及证明"
rt.Cells(1,0).Text = date.today
rt.Cells(2,0).Text = "收货人及其"
rt.Cells(3,0).Text = "纳税识别码"
rt.Cells(4,0).Text = "发货人及其"
rt.Cells(5,0).Text = "纳税识别码"
rt.Cells(6,0).Text = "承运人及其"
rt.Cells(7,0).Text = "纳税识别码"
rt.Cells(2,2).Text = "电"
rt.Cells(3,2).Text = "话"
rt.Cells(4,2).Text = "电"
rt.Cells(5,2).Text = "话"
rt.Cells(6,2).Text = "电"
rt.Cells(7,2).Text = "话"
rt.Cells(2,1).Text = drx("收货_单位")
rt.Cells(4,1).Text = drx("发货_单位")
rt.Cells(6,1).Text = drx("承运单位")
rt.Cells(3,1).Text = drx("收货_税号")
rt.Cells(5,1).Text = drx("发货_税号")
rt.Cells(7,1).Text = drx("承运税号")
rt.Cells(2,3).Text = drx("收货_电话")
rt.Cells(4,3).Text = drx("发货_电话")
rt.Cells(6,3).Text = drx("运承电话")
doc.Body.Children.Add(rt)
rt = New prt.RenderTable
rt.Style.GridLines.All = prt.Linedef.Default '网格线为默认类型
rt.CellStyle.Spacing.All = 2 '行与行之间的间隔
rt.Cols(0).Width = 28
rt.Cols(1).Width = 16
rt.Cols(2).Width = 16
Dim bctbl As dataTable = dataTables("开piao记录")
dim bcrows as list(of datarow)
bcrows = bctbl.select("[打印] = true ")
if bcrows.count < 5 then
for bci as integer = 0 to bcrows.count -1
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 = "大写金额"
rt.Cells(bci+1,1).Text = bcrows(bci)("重量")
rt.Cells(bci+1,2).Text = bcrows(bci)("运价")
rt.Cells(bci+1,3).Text = bcrows(bci)("运费")
rt.Cells(bci+1,4).Text = cumoney(bcrows(bci)("运费"))
for jia as integer = bcrows.count + 1 to 5
rt.Cells(jia,1).Text = "-----"
rt.Cells(jia,2).Text = "-----"
rt.Cells(jia,3).Text = "-----"
rt.Cells(jia,4).Text = "-----"
next
rt.Cells(6,0).Text = "合计"
rt.Cells(6,3).Text = ss
rt.Cells(6,4).Text = cumoney(ss)
next
end if
doc.Body.Children.Add(rt)
doc.Preview()
dim ss as integer
Dim dst As WinForm.DataList = e.Form.Controls("DataList1")
Dim drx as DataRow
For Index As Integer = 0 To dst.Count - 1
If dst.GetChecked(Index) Then
Dim dr As DataRow = dst.GetDataRow(Index)
dr("打印") = true
ss = dr("运费") + ss
drx = dst.GetDataRow(Index)
end if
next
Dim doc As New Printdoc
Dim rt As prt.RenderTable
rt = New prt.RenderTable
rt.Cells(0,0).Style.TextAlignHorz = prt.AlignHorzEnum.Center '水平居中
rt.Cells(1,0).Style.TextAlignHorz = prt.AlignHorzEnum.right '右
rt.Cells(0,0).SpanCols = 4
rt.Cells(1,0).SpanCols = 4
rt.Cols(0).Width = 28 '设第一列大小
rt.Cols(2).Width = 10
rt.Cells(0,0).Style.Font = New Font("宋体", 16, FontStyle.Bold) '设置字体
rt.CellStyle.Spacing.All = 3 '行与行之间的间隔
rt.rows(2).Style.Borders.left = New prt.LineDef '设表格左边线
rt.rows(3).Style.Borders.left = New prt.LineDef
rt.rows(4).Style.Borders.left = New prt.LineDef
rt.rows(5).Style.Borders.left = New prt.LineDef
rt.rows(6).Style.Borders.left = New prt.LineDef
rt.rows(7).Style.Borders.left = New prt.LineDef
rt.rows(2).Style.Borders.right = New prt.LineDef
rt.rows(3).Style.Borders.right = New prt.LineDef
rt.rows(4).Style.Borders.right = New prt.LineDef
rt.rows(5).Style.Borders.right = New prt.LineDef
rt.rows(6).Style.Borders.right = New prt.LineDef
rt.rows(7).Style.Borders.right = New prt.LineDef
rt.cells(2,1).Style.Borders.left = New prt.LineDef
rt.cells(3,1).Style.Borders.left = New prt.LineDef
rt.cells(4,1).Style.Borders.left = New prt.LineDef
rt.cells(5,1).Style.Borders.left = New prt.LineDef
rt.cells(6,1).Style.Borders.left = New prt.LineDef
rt.cells(7,1).Style.Borders.left = New prt.LineDef
rt.cells(2,2).Style.Borders.left = New prt.LineDef
rt.cells(3,2).Style.Borders.left = New prt.LineDef
rt.cells(4,2).Style.Borders.left = New prt.LineDef
rt.cells(5,2).Style.Borders.left = New prt.LineDef
rt.cells(6,2).Style.Borders.left = New prt.LineDef
rt.cells(7,2).Style.Borders.left = New prt.LineDef
rt.cells(2,3).Style.Borders.left = New prt.LineDef
rt.cells(3,3).Style.Borders.left = New prt.LineDef
rt.cells(4,3).Style.Borders.left = New prt.LineDef
rt.cells(5,3).Style.Borders.left = New prt.LineDef
rt.cells(6,3).Style.Borders.left = New prt.LineDef
rt.cells(7,3).Style.Borders.left = New prt.LineDef
rt.rows(2).Style.Borders.Top = New prt.LineDef
rt.rows(4).Style.Borders.Top = New prt.LineDef
rt.rows(6).Style.Borders.Top = New prt.LineDef
rt.rows(7).Style.Borders.bottom = New prt.LineDef
rt.Cells(0,0).Text = "货物运输及证明"
rt.Cells(1,0).Text = date.today
rt.Cells(2,0).Text = "收货人及其"
rt.Cells(3,0).Text = "纳税识别码"
rt.Cells(4,0).Text = "发货人及其"
rt.Cells(5,0).Text = "纳税识别码"
rt.Cells(6,0).Text = "承运人及其"
rt.Cells(7,0).Text = "纳税识别码"
rt.Cells(2,2).Text = "电"
rt.Cells(3,2).Text = "话"
rt.Cells(4,2).Text = "电"
rt.Cells(5,2).Text = "话"
rt.Cells(6,2).Text = "电"
rt.Cells(7,2).Text = "话"
rt.Cells(2,1).Text = drx("收货_单位")
rt.Cells(4,1).Text = drx("发货_单位")
rt.Cells(6,1).Text = drx("承运单位")
rt.Cells(3,1).Text = drx("收货_税号")
rt.Cells(5,1).Text = drx("发货_税号")
rt.Cells(7,1).Text = drx("承运税号")
rt.Cells(2,3).Text = drx("收货_电话")
rt.Cells(4,3).Text = drx("发货_电话")
rt.Cells(6,3).Text = drx("运承电话")
doc.Body.Children.Add(rt)
rt = New prt.RenderTable
rt.Style.GridLines.All = prt.Linedef.Default '网格线为默认类型
rt.CellStyle.Spacing.All = 2 '行与行之间的间隔
rt.Cols(0).Width = 28
rt.Cols(1).Width = 16
rt.Cols(2).Width = 16
Dim bctbl As dataTable = dataTables("开piao记录")
dim bcrows as list(of datarow)
bcrows = bctbl.select("[打印] = true ")
if bcrows.count < 5 then
for bci as integer = 0 to bcrows.count -1
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 = "大写金额"
rt.Cells(bci+1,1).Text = bcrows(bci)("重量")
rt.Cells(bci+1,2).Text = bcrows(bci)("运价")
rt.Cells(bci+1,3).Text = bcrows(bci)("运费")
rt.Cells(bci+1,4).Text = cumoney(bcrows(bci)("运费"))
for jia as integer = bcrows.count + 1 to 5
rt.Cells(jia,1).Text = "-----"
rt.Cells(jia,2).Text = "-----"
rt.Cells(jia,3).Text = "-----"
rt.Cells(jia,4).Text = "-----"
next
rt.Cells(6,0).Text = "合计"
rt.Cells(6,3).Text = ss
rt.Cells(6,4).Text = cumoney(ss)
next
end if
doc.Body.Children.Add(rt)
doc.Preview()
你真厉害,专业报表的水平编码是在太牛了.以后有了问题请教.