Foxtable(狐表)用户栏目专家坐堂 → [求助]谁能帮我把报表设计完成啊


  共有25485人关注过本帖树形打印复制链接

主题:[求助]谁能帮我把报表设计完成啊

帅哥哟,离线,有人找我吗?
gdtgl
  1楼 | 信息 | 搜索 | 邮箱 | 主页 | UC


加好友 发短信
等级:一尾狐 帖子:445 积分:3025 威望:0 精华:0 注册:2008/9/13 10:49:00
  发帖心情 Post By:2008/12/7 12:48:00 [显示全部帖子]


图片点击可在新窗口打开查看此主题相关图片如下:snap1.jpg
图片点击可在新窗口打开查看



图片点击可在新窗口打开查看此主题相关图片如下:snap2.jpg
图片点击可在新窗口打开查看


 下载信息  [文件大小:   下载次数: ]
图片点击可在新窗口打开查看点击浏览该文件:汽车管理系统.rar


余下的表格合并,字体设置,只是有些烦,不复杂
[此贴子已经被作者于2008-12-7 13:04:31编辑过]

 回到顶部
帅哥哟,离线,有人找我吗?
gdtgl
  2楼 | 信息 | 搜索 | 邮箱 | 主页 | UC


加好友 发短信
等级:一尾狐 帖子:445 积分:3025 威望:0 精华:0 注册:2008/9/13 10:49:00
  发帖心情 Post By:2008/12/8 21:08:00 [显示全部帖子]


图片点击可在新窗口打开查看此主题相关图片如下:snap3.jpg
图片点击可在新窗口打开查看

 下载信息  [文件大小:   下载次数: ]
图片点击可在新窗口打开查看点击浏览该文件:汽车管理系统.rar


 回到顶部
帅哥哟,离线,有人找我吗?
gdtgl
  3楼 | 信息 | 搜索 | 邮箱 | 主页 | UC


加好友 发短信
等级:一尾狐 帖子:445 积分:3025 威望:0 精华:0 注册:2008/9/13 10:49:00
  发帖心情 Post By:2008/12/8 21:10:00 [显示全部帖子]

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()


 回到顶部