reportviewer で画像フィールド (画像/バイト配列) のデータ型を表示しようとした人がいます。
よろしく、ピーター
はい。ReportViewer では、画像を正しく表示するために Base64 画像エンコーディングが必要です。
画像がバイト配列にある場合は、Base64 に変換する必要があります。
Public Function ConvertImageToBase64String(ByVal img As Image) As String
Dim output As String = ""
Dim outputArray() As Byte
Dim stream As New MemoryStream
img.Save(stream, Drawing.Imaging.ImageFormat.Bmp)
outputArray = stream.ToArray()
stream.Close()
output = Convert.ToBase64String(outputArray)
Return output
End Function
SQL Server で画像データ型を使用しています。SSRS 2005 および 2008 で正常に動作します。