我正在尝试使用数据集填充 Crystal Report 并尝试加载图像。我有一个字节数组中的图像。我即将加载我的字符串数据就好了。我有一个带有数据表和一些列的数据集。这是我的代码,但我对这一行有问题:
t.Columns.Add("Item", Type.GetType(System.Byte()))
具体来说System.Byte()
这是我的完整代码,有人知道我应该用什么替换该行吗?
Private Function GetGmap(ByVal objGEOCode As String)
Dim gmap As New CtpGglMap.Impl.StaticGMap
Dim temp As New GMarker
Dim temp2 As New GMarker
Dim ArrTemp()
ArrTemp = Split(objGEOCode, ",")
gmap.Center = New GeoPointImpl(ArrTemp(0), ArrTemp(1))
gmap.Zoom = 14
gmap.Height = 159
gmap.Width = 137
gmap.Sensor = False
' GetDrivingDirectionFromGoogle("fishkill ,ny", "41.5442847, -73.8732391")
temp.Point = New GeoPointImpl(ArrTemp(0), ArrTemp(1))
temp.SetMap(gmap)
'CREATE A BITMAP FROM THE MEMORY STREAM
Return New System.Drawing.Bitmap(gmap.Fetch)
Return True
End Function
Private Sub Button1_Click(sender As System.Object, e As System.EventArgs) Handles Button1.Click
Dim ds As New DataSet1
Dim t As DataTable = ds.Tables.Add("Items")
t.Columns.Add("id", Type.GetType("System.String"))
t.Columns.Add("Item", Type.GetType(System.Byte()))
Dim r As DataRow
r = t.NewRow()
r("id") = "Test"
r("Item") = GetGmap("41.5442847, -73.8732391")
t.Rows.Add(r)
Dim objRpt As New CrystalReport1
objRpt.SetDataSource(ds.Tables(1))
CrystalReportViewer1.ReportSource = objRpt
CrystalReportViewer1.Refresh()
CrystalReportViewer1.PrintReport()
End Sub