cancel
Showing results for 
Search instead for 
Did you mean: 

Image (system.byte[]) not showing in Crystal Report - Visual Studio

Former Member
0 Kudos

Hi there ! I am having a problem!

My image is stored in an SQL database ( SQL 2008 ) as an image field ! I retrieve it from the database using an OLEDB connection to show it in my report (Blob object) but it is empty and doesn't show anything !

The image is in a datatable in (system.byte[]) format and it shows well in a picture box

I am using Visual studio 2010 and C# (.net 4.0 )

Message was edited by: Ludek Uher

Accepted Solutions (1)

Accepted Solutions (1)

former_member183750
Active Contributor
0 Kudos

Make sure you are using SAP Crystal Reports, developer version for Microsoft Visual Studio, SP 8. Then use the "Format Graphic" formula as described in the following KBA (or search the CR Help file for "Format Graphic".

1320507 - How to change images dynamically in Crystal Reports based on parameter selection?

The KBA is not precisely what you need, but the idea as described under Resolution should help. You may also want to see the following doc:

Insert Images Into a Database for Use with Crystal Reports

- Ludek

Senior Support Engineer AGS Product Support, Global Support Center Canada

Follow us on Twitter

Former Member
0 Kudos

Hi there once again! I got it fixed!

Thought I would share how so others may benefit!   Actually the function I had which was converting the image into binary to store in database was converting it using .Gif format ! I got to know that crystal reports didn't support .gif but I didn't know I was converting it into .gif !

So after going through my code I changed it to .Jpeg and it works like a charm now! Thank you!

former_member183750
Active Contributor
0 Kudos

Many thanks for sharing the solution Ahmed.

Happy coding,

- Ludek

Answers (0)