Rss & SiteMap

Foxtable(狐表) http://www.foxtable.com

新一代数据库软件,完美融合Access、Foxpro、Excel、vb.net之优势,人人都能掌握的快速软件开发工具!
共11 条记录, 每页显示 10 条, 页签: [1] [2]
[浏览完整版]

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

1楼
号子 发表于:2008/12/6 19:28:00
附件里有个报表,表已做好,请帮我完成如下要求:
1.不要关联,因开piao常有加减运价开现象,关联与主表数据同步不好,
2.一张报表最多打印五条记录,不够补空行.
3.其它要求按表中要求.
4.exce报表不能实现的话,可用专业报表.
现在最头痛的是不能处理多条记录在一张表上打印的问题,因为多条记录中有些列只打印一次,
 下载信息  [文件大小:   下载次数: ]
图片点击可在新窗口打开查看点击浏览该文件:汽车管理系统.rar

2楼
gdtgl 发表于:2008/12/7 12:48:00

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



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


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


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

还没学到,看不懂,但,金额不合计啊,电话列也漏掉了
图片点击可在新窗口打开查看此主题相关图片如下:fa piao.jpg
图片点击可在新窗口打开查看

4楼
blackzhu 发表于:2008/12/8 13:02:00
以下是引用号子在2008-12-7 23:50:00的发言:

还没学到,看不懂,但,金额不合计啊,电话列也漏掉了
图片点击可在新窗口打开查看此主题相关图片如下:fa piao.jpg
图片点击可在新窗口打开查看

   你看看是不是要这种做法,另外我觉得你这个项目表设计的不好,最好另外最重新设计。还有你那个大写的代码自己写一下。

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

5楼
blackzhu 发表于:2008/12/8 14:15:00
以下是引用号子在2008-12-6 19:28:00的发言:
附件里有个报表,表已做好,请帮我完成如下要求:
1.不要关联,因开piao常有加减运价开现象,关联与主表数据同步不好,
2.一张报表最多打印五条记录,不够补空行.
3.其它要求按表中要求.
4.exce报表不能实现的话,可用专业报表.
现在最头痛的是不能处理多条记录在一张表上打印的问题,因为多条记录中有些列只打印一次,
 下载信息  [文件大小:38.5 KB  下载次数:18]
图片点击可在新窗口打开查看点击浏览该文件:汽车管理系统.rar

   多条记录一定要先筛选,再全选。

6楼
blackzhu 发表于:2008/12/8 16:55:00
金额大写的代码:


if e.datacol.name = "第一列" then
Dim t1 As String
t1 = cumoney(e.datarow("第一列"))
Output.Show(t1)
e.datarow("第二列")= t1
end if
7楼
gdtgl 发表于:2008/12/8 21:08:00

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

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

8楼
gdtgl 发表于: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()

9楼
狐狸爸爸 发表于:2008/12/8 21:13:00
楼上厉害
10楼
blackzhu 发表于:2008/12/9 11:22:00
以下是引用gdtgl在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()

  你真厉害,专业报表的水平编码是在太牛了.以后有了问题请教.

共11 条记录, 每页显示 10 条, 页签: [1] [2]

Copyright © 2000 - 2018 foxtable.com Tel: 4000-810-820 粤ICP备11091905号

Powered By Dvbbs Version 8.3.0
Processed in .03516 s, 6 queries.