下列代码如何把列名换成标题
Dim doc As New
PrintDoc
Dim rt As New prt.RenderTable
Dim Count As
Integer = 0
For
Each Col AS
DataCol
In Dt.DataCols
rt.Cells(0,Count).Text = Col.Name Caption
For r As
integer = 0
To dt.DataRows.Count - 1
rt.Cells(r +1,Count).Text = dt.DataRows(r)(Col.Name) Caption
Next
Count = Count + 1
Next
rt.Style.Gridlines.All = New prt.Linedef(Color.Gray)
rt.CellStyle.Spacing.All = 1
rt.Rows(0).Style.TextAlignHorz = prt.AlignHorzEnum.Center
doc.Body.Children.Add(rt)
doc.Preview()
[此贴子已经被作者于2015/9/24 7:34:08编辑过]