CrystalDecision.CrystalReport - How to dispay an image from Blob field in MySQL using VB.NET?

Hi experts,
How can I display an image from a Blob field in MySQL on report through CrystalDecision.CrystalReport using VB.NET.
I have set up a report in VB.NET using CrystalDecision.CrystalReport. The report source is from one of the tables in a dataset. This dataset is updated during run-time. Data Type for the image in the dataset is hexBinary and the image is stored in MySQL with type mediumblob. Somehow all other fields in dataset are displayed on the report except for the image.
Please help!
Many thanks
Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
Is the blob a bitmap?  Crystal only supports bitmaps that are stored that way.

LanAnhAuthor Commented:
Hi emoreau,
The comments in the code mention about creating schema for designing the report. I can't view the schema in this example as it is no longer exist after the report is created. I'd like to know what is the data type in the schema equivalent to System.Type.GetType("System.Byte[]").
I have included in my project a schema DatasetSource.xsd which have many tables for many other reports purpose. The table that hold the image (JPEG), I set the data type is hexBinary. In my code when I pass the table look like this:

dsReport.Tables.Add(New DatasetSource.asset_generalDataTable)
rs.Open(sqlMain, cnn, ADODB.CursorTypeEnum.adOpenStatic, ADODB.LockTypeEnum.adLockOptimistic)

recordsetToDataset(rs, dsReport, "asset_general") 'other procedure to tranfer data from recordset to dataset


Can you find any thing wrong? as the image is not shown in the report.
Many thanks!

PS. Thanks mlmcc.  I am investigating your info
LanAnhAuthor Commented:
Hi emoreau,
I have found my problem in my procedure recordsetToDataset.
 row(i) = rs.Fields(i).Value
I modified the code to readBytes when it read the column contains the image
It works perfectly now.
Thanks alot .
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Crystal Reports

From novice to tech pro — start learning today.

Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.