Please help anyone, dynamic images in CR9 using .ttx and Dataset

  • Thread starter Thread starter Ed
  • Start date Start date
E

Ed

I've search around endlessly for a solution to this problem but have
not found anything yet.

I'm using Crystal 9 with .NET. I am not using a DSR to create the
report. Instead I am creating a report at run-time, using a .ttx file
and using a DataSet as the source.

My problem is that I want to dynamically change an image (user's pic)
on the report based on the user parameter.

Opening up the Crystal Designer does not give me much. I added my OLE
object (Bitmap Image or Image Document) to the form, but there is no
way to specify the source of the image!

Ideally I'd like to pass a file path that specifies the OLE object
source location, but I'll take anything now. I could pass a blob
through the Dataset, but even still, there doesn't seem to be a way to
associate the blob with the OLE object. Has anyone done this before?

Thanks,
ed
 
Does anyone know how to do this? or is it even possible? I've also
tried to add the following in my ttx:

employee_img blob 5000000 blob sample value

is this even how i'm supposed to put a blob in a ttx? I'm not sure
about the size or the sample value fields. Anyways, I pulled this
blob in the crystal report and whenever i run the report, the OLE
object disappears, regardless of what i send.

On the VB side, i assign the datacolumn as follows:

Dim imgTemp As System.Drawing.Image
imgTemp = System.Drawing.Image.FromFile("c:\pig.jpg")
drRow("employee_img") = imgTemp

There are no compile or runtime errors, however the OLE object never
shows up with or without the image.

any ideas?
ed
 
Back
Top