Link to home
Start Free TrialLog in
Avatar of coletteck8
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("ImageColumn", 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\reportschema.xsd")
        Dim cr As New imagereport
        cr.SetDataSource(ds)
        Dim frm As New Form3
        frm.CrystalReportViewer1.ReportSource = cr
        frm.Show()
ASKER CERTIFIED SOLUTION
Avatar of Kurt Reinhardt
Kurt Reinhardt
Flag of United States of America image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of Mike McCracken
Mike McCracken

Does the report display from the Crystal designer?

Is this on the development machine with Crystal loaded?

mlmcc
Avatar of coletteck8

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
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.
rhinok,
you are correct. GIF is not supported. had to make it a jpeg. thanks for your help.