提示:路径中具有非法字符;
dim k as string
Dim doc As New PrintDoc '定义一个报表
Dim rt As New prt.RenderTable() '定义一个表格对象
doc.Body.Children.Add(rt) '将表格对象加入到报表中
rt.Style.GridLines.All = New prt.Linedef '将网格线设为默认类型
For r As Integer = 0 To Tables("产品").Rows.Count-1
For c As Integer = 0 To Tables("产品").Cols.Count-1
If Tables("产品").Cols(c).Name = "产品编号" Or Tables("产品").Cols(c).Name = "产品全名" Then
rt.Cells(r, c).Text = Tables("客户信息_Table价格管理").Rows(r)(c)
Else If Tables("产品").Cols(c).Name = "图片" Then
k = Tables("产品").Value(r,c) '表中图片列 比方说,当前为 777.jpg
rt.Cells(r, c).Image = GetImage(k)
end if
next
next
生成报表时候,提示 "路径中具有非法字符"
__________________________________________________
但 dim k as string = "777.jpg"
rt.Cells(r, c).Image = GetImage(k)
这样就可以正常生成报表
[此贴子已经被作者于2012-8-29 15:21:37编辑过]