coletteck8
asked on
GIF image not showing in crystal report
i am using the code below to get an image to display on a crystal report. i then created a report using the xsd as the datasource, which created a blob field on the report. my problem is, there is no image being displayed. i can see that the dataset is holding the image after a step-through, so can anyone help?
Dim ds As New DataSet
Dim dt As New DataTable
Dim row1 As DataRow
Dim values(0) As Object
ds.Tables.Add("Images")
ds.Tables(0).Columns.Add(" ImageColum n", GetType(Byte()))
If Not ipNotes.Image Is Nothing Then values(0) = ipNotes.Image.ToArray
row1 = ds.Tables(0).NewRow()
row1(0) = values(0)
ds.Tables(0).Rows.Add(row1 )
'ds.Tables.Add(dt)
ds.WriteXmlSchema("c:\PSI\ reportsche ma.xsd")
Dim cr As New imagereport
cr.SetDataSource(ds)
Dim frm As New Form3
frm.CrystalReportViewer1.R eportSourc e = cr
frm.Show()
Dim ds As New DataSet
Dim dt As New DataTable
Dim row1 As DataRow
Dim values(0) As Object
ds.Tables.Add("Images")
ds.Tables(0).Columns.Add("
If Not ipNotes.Image Is Nothing Then values(0) = ipNotes.Image.ToArray
row1 = ds.Tables(0).NewRow()
row1(0) = values(0)
ds.Tables(0).Rows.Add(row1
'ds.Tables.Add(dt)
ds.WriteXmlSchema("c:\PSI\
Dim cr As New imagereport
cr.SetDataSource(ds)
Dim frm As New Form3
frm.CrystalReportViewer1.R
frm.Show()
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
right now i'm using a crystal report viewer just to check for the image, but in production, the report will be printed directly without having the capability to view it. it displays with a date, but no image. i am using cr that comes with vs.net
ASKER
i think there is a problem with the line that reads row1(0) = values(0) since i'm not seeing the array there at the step-through, but i do see it up until then.
ASKER
rhinok,
you are correct. GIF is not supported. had to make it a jpeg. thanks for your help.
you are correct. GIF is not supported. had to make it a jpeg. thanks for your help.
Is this on the development machine with Crystal loaded?
mlmcc