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 Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Displaying jpegs on reports 1

Status
Not open for further replies.

aidenryan

Programmer
May 18, 2001
14
0
0
CA
I'm new at using crystal, and I was wondering what steps I have to take in order to display jpegs on reports.
 
If you just want to place the company logo or other graphic on your report, you can do an Insert / Picture and choose a bitmap, jpeg, etc. to place on your report. Brian J. Alves
Terrier Consulting, Inc.
Email: brian.alves@worldnet.att.net
VB / Crystal / SQLServer
 
I just posted a (half-)answer to microsoft.public.vb.crystal newsgroup about this. If you need to insert jpegs that are stored in a database, I can help. If you need this, please post again with more specifics.
 
I will have to check out the newsgroup message. There is a recurring question as to how to print graphic files when the path is stored in the data table. The stock answer is that you can't unless the image is stored as a BLOB in the file. If bardley has a way to do that, lots of folks will want to know. Ken Hamady
On-site custom Crystal Reports Training and Consulting.
Quick Reference Guide to using Crystal in VB.
 
Actually, Ken, I can save you the trouble. Our answer was BLOBs, and that's the first and only solution we tried. That's why I wasn't sure if my answer would apply to this situation or not.

bardley Brad Gunsalus
Cymtec Systems, Inc.
bgunsalus@cymtec.com
 
Thanks anyway. You had me excited there for a minute. Ken Hamady
On-site custom Crystal Reports Training and Consulting.
Quick Reference Guide to using Crystal in VB.
 
Thanks for your help guys.
One more question, how do I store an image as a BLOB in a database?
 
It probably depends on what database you're using. We're using Oracle 8, and there's some package (DBMS_LOB or something) that contains stored procedures to load files into the database.
It's not as simple as adding a field, because of the potentially huge binary objects you could stick in a table. To load a blob into Oracle (as far as I know), you need to have the file available on a drive to the machine running Oracle. Then the stored procedure goes out and gets the file and loads it into a table.
Brad Gunsalus
Cymtec Systems, Inc.
bgunsalus@cymtec.com
 
What about for an access db? Possible or not?
 
This should please you immensely--you don't need the LOB procedures for Access. All you have to do is get the jpegs into the table you're using (must be a column with type 'OLE object'). Then on your report, just do insert field->database field and find the field with your jpegs and place it on the report, just like any other database field.

Do you want a different jpeg with every detail, or in a group header/footer, or in a report header/footer?
Brad Gunsalus
Cymtec Systems, Inc.
bgunsalus@cymtec.com
 
Thanks for the tip!
I had no trouble placing a bmp in a report, however I couldn't seem to get jpegs or gifs to do the same. In the database field, when I insert a bmp, the field reads "Bitmap Image", when I insert a jpeg or a gif, the field reads "Package". The package objects won't show up when I try to place them in a report. Any further suggestions?
 
i too cannot get anything but bitmaps to work in access, does this have to do with the file associations on each computer with regard to jpegs? i know very little about dde and ole and think it has something to do with that.

Jeremy
 


Could you pleasssssssse tell me how to insert different jpeg with every detail. Not just in the report header/footer. Is it possible to display a different image depending on the field in the details section??

Thnx,
jonathan8@hotmail.com
 
This is currently not supported by CR unless you store the image itself as a BLOB field in the database. Ken Hamady, On-site/Phone Crystal Reports Training/Consulting
Quick Reference Guide to using Crystal in VB
 
Hi guys,

With just the path & filename of the jpeg/gif/bmp, you can change images in your report dynamically if and only if you're using RDC (Report Designer Component) implementation of Crystal Report Engine. The secret is in the formattedpicture property of an OLE object in the RDC. However you can only change this property during a format event of the section containing the OLE object. YOu can search the knowledgebase at Forget about Crystal Automation server or OCX, new features of Crystal Report Engine in future are only available to RDC.

My 0.01 cent.

Anthony Maluenda
anthony_maluenda@yahoo.com
Crystal Reports Developer
Certified by: Brainbench & Hammerman Associates
 
I had the same problem, the solution occurred to me after reading another post from someone who got it to work with BMPs but could not with JPGs or GIFs.

Since I was storing image data only from JPG files (which are smaller), I tried storing binary data from BMPs instead and it worked. For confirmation, I tried storing some BMPs and some JPGs and Crystal Reports only displayed the BMPs.

I have only tested this using an ODBC connection to SQL Server 7 (it should work with other ODBC sources)
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top