Rss & SiteMap
Foxtable(狐表) http://www.foxtable.com
Dim doc As New PrintDoc
Dim rt As Prt.RenderTable
Dim tbl As Table = Tables("领药单")
Dim Rows As List(Of DataRow)
Dim Regions As List(Of String) = tbl.DataTable.GetUniqueValues("","床位")
doc.Pagesetting.LandScape = false
For Each Region As String In Regions
Dim rs As New prt.RenderText
Dim dr As DataRow = datatables("住院信息").find("[床位] = '" & region & "'")
rs.Text = "床位: " & dr("床位") & " 姓名: " & dr("姓名") & " 住院号 : " & dr("住院号")
rs.Style.FontSize = 10
rs.Style.FontBold = True
doc.Body.Children.Add(rs)
rt = New prt.RenderTable
rt.Style.TextAlignVert = prt.AlignVertEnum.Center
rt.Style.GridLines.Top = New prt.LineDef(0.4,Color.Black)
rt.Style.Spacing.Bottom = 5
rt.CellStyle.Spacing.All = 1
rt.Style.Font = tbl.Font
rt.Cols(0).Width = 0
rt.Cols(1).Width = 0
rt.Cols(2).Width = 0
rt.Cols(3).Width = 40
Rows = tbl.Datatable.Select("[床位] = '" & Region & "'")
For c As integer = 0 To tbl.Cols.Count - 1
rt.Cells(0,c).Text = tbl.Cols(c).Name
For r As integer = 0 To Rows.Count -1
rt.Cells(r + 1, c).Text = rows(r)(tbl.Cols(c).Name)
Next
rt.Cells(tbl.Rows.Count,8).Text = "小计"
rt.Cells(tbl.Rows.Count,9).Text = tbl.compute("SUM(金额)","[床位] = '" & Region & "'")
Next
rt.RowGroups(0,1).Header = prt.TableHeaderEnum.All
rt.Style.Gridlines.Horz = New prt.Linedef(0.3,Color.LightGray)
doc.Body.Children.Add(rt)
Next
doc.preview()
Doc.PageHeader = rs
将这段替换你下面的代码,试试
doc.Body.Children.Add(rs)
页眉另有代码...
这段文本只是分表的表标题.......床号/姓名/住院号/
分表的表头能分页显示....表标题就不行了...我在帮助里也没找到表标题重复显示的示例....
我还是看的是一楼的代码,以为是页眉呢
我还是看的是一楼的代码,以为是页眉呢
晕...就是一楼的代码啊.....我省略了页眉页脚代码.....