--
Dim ColNames As String() = New String(){"序号","产品编码","品名","图片","规格","数量","计量单位","箱号","装箱数","备注"}
Dim drs As List(Of DataRow)
drs = DataTables("订单_明细").Select("订单编号 = \'" & CurRow("订单编号") & "\'")
If drs.count > 0 Then \'如果有值
For i As Integer = 0 To drs.Count-1
rt.Rows(rt.Rows.Count).Height = rh
For c As Integer = 0 To ColNames.Length -1
If c = 0 Then \'序号列格式化为两位
rt.cells(rt.Rows.Count-1,c).text = Format(i+1,"00")
ElseIf c = 3 Then \'图片列
Dim rm As New prt.RenderImage() \'定义一个图片对象
rm.Image = GetImage(drs(i)(ColNames(c))) \'请改为实际的图标名称和路径
rm.Style.ImageAlign.AlignHorz = prt.ImageAlignHorzEnum.Center \'图片水平居中
rm.Style.ImageAlign.AlignVert = prt.ImageAlignVertEnum.Center \'图片垂直居中
rm.Style.ImageAlign.StretchHorz = False \'禁止水平方向扩展图片
rm.Style.ImageAlign.StretchVert = False \'禁止垂直方向扩展图片
rt.cells(rt.Rows.Count-1,c).RenderObject = rm \'将单元格内容设置为图片对象rm
.......
End If
Next
Next
End If
请教下老师,红色的地方因为图片列是用ftp上的jpg文件,用msgxob()显示出来的路径是"/Photo/11-UR80.jpg"
打印预览的结果没有出错,但是图片列全部都变为空了,那个地方的路径应该怎么写才正确?
谢谢!