Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Binary data(image) to show in Excel or Access Report

Status
Not open for further replies.

yurok

Programmer
Oct 13, 2004
14
US
Hi guys,

I have binary data stored in both SQL Server and Access, both being the image of the product.
It shows fine in Crystal Report and even can be exported in PDF, but fails to do it in Access reports of if I try to export it to Excel
Please help if anyone succeeded with this

Thanks a lot


 
Just load the data as binary, then save it as a binary file, but give it a graphic file extension (.gif or .jpg). Then load the file.

Gerry
 
Thanks Gerry,
but I have all this files with JPG extension.
The reason I've loaded them as binary to SQL Server Image field and Access OLE Object field is to be able to show it on report(not on VB form). The idea to manually insert image for three thousands records in Access database doesn't semm to be a solution
As mentioned it shows fine in Crystal Report but not on Access report or when exporting to Excel. Hope that clarifies it a little more. Any more suggesions?
Thanks
 
I don't know about manually doing it...
I have binary data stored in both SQL Server and Access

Is that data not byte arrays?

' Create an array to hold the data.
Dim d() As Byte

' Put data into a file.
Open "temp.jpg" For Binary As #1
d() = your byte array from Image Field
Put #1, 1, d()
Close

' Load the data file as a picture.
Picture1.Picture = LoadPicture("temp.jpg")

I have used this to pull multiple images from a web server, as binary. You can use the temp file repeatedly to fill as many image containers as you like. Multiple containers can be loaded with "temp", with "temp" having different contents, because the containers once they are loaded...I think... hold them back again as byte arrays.

Other than that...out of my league I'm afraid.


Gerry
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top