此主题相关图片如下:001.jpg
标记了红色代码部份...我想两个日期在同一行,但一个左对齐,一个右对齐,怎么改?暂时只会用空格来代替.....Dim doc As New PrintDoc
Dim rt As Prt.RenderTable
Dim rx,ry As prt.RenderText
Dim Rq As String= Forms("一日清单").Controls("DateTimePicker1").text
Dim tbl As Table = Tables("一日清单")
Dim Rows As List(Of DataRow)
Dim Regions As List(Of String) = tbl.DataTable.GetUniqueValues("","患者ID")
doc.Pagesetting.LandScape = false
For Each Region As String In Regions
rx = New prt.RenderText
rx.Style.FontSize = 10
'rx.Style.FontBold = True
rx.Style.Spacing.Bottom = 2
rx.Text = "患者ID: " & Region
doc.Body.Children.Add(rx)
ry = New prt.RenderText
ry.Style.FontSize = 8
'ry.Style.FontBold = True
ry.Style.Spacing.Bottom = 2
ry.Text =
"清单日期: " & Rq & " 打印日期:" & date.today
doc.Body.Children.Add(ry)
rt = New prt.RenderTable
rt.Style.Font = Tables("一日清单").Font
rt.Style.TextAlignVert = prt.AlignVertEnum.Center
rt.Style.GridLines.All = New prt.LineDef(0.3,Color.LightGray)
rt.Style.Spacing.Bottom = 5
rt.CellStyle.Spacing.All = 1
rt.Style.Font = tbl.Font
Rows = tbl.Datatable.Select("[患者ID] = '" & Region & "'")
For c As integer = 0 To tbl.Cols.Count - 1
rt.Cells(0,c).Text = tbl.Cols(c).Name
rt.Cols(c).Width = tbl.Cols(c).PrintWidth
For r As integer = 0 To Rows.Count -1
rt.Cells(r + 1, c).Text = rows(r)(tbl.Cols(c).Name)
Next
Next
rt.RowGroups(0,1).Header = prt.TableHeaderEnum.All
doc.Body.Children.Add(rt)
Next
doc.preview()
[此贴子已经被作者于2008-12-22 10:42:03编辑过]