Still celebrating National IT Professionals Day with 3 months of free Premium Membership. Use Code ITDAY17

x
?
Solved

Insert image dependant on a variable field into Crystal Reports

Posted on 2013-12-11
4
Medium Priority
?
596 Views
Last Modified: 2013-12-12
Hello Experts,
I would like to insert an image into a report and need some help. The report I am generating is a receipt. The stock database contains the text info I need for a particular item to output into the receipt but the images are stored in a separate folder.

My report contains a field called {part_code}. The images are located in C:\Images and are called {part_code}.jpg. For the receipt which contains {part_code} I would like to print on the recipt the image {part_code}.jpg.

It sounds like it should be easy, but I can't figure it out!
0
Comment
Question by:holdsworthbros
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
4 Comments
 
LVL 35

Assisted Solution

by:James0628
James0628 earned 500 total points
ID: 39713720
Which version of CR?  I think they added a capability like that at some point, but I'm not sure which version.  I don't see it in CR 10.

 James
0
 
LVL 23

Assisted Solution

by:Ido Millet
Ido Millet earned 500 total points
ID: 39713836
If memory serves, this started with Crystal XI. Insert a dummy picture into the report, but then right-click the picture, Format Graphic and under the Picture Tab you will find a "Graphic Location" option where you can enter an expression to control the path to the picture.
1
 
LVL 26

Accepted Solution

by:
Kurt Reinhardt earned 500 total points
ID: 39713892
FYI, if you only have a handful of part numbers then the Dynamic Graphic option (assuming you have a version that supports it) is feasible.  If you have hundreds of parts or more, then this isn't feasible and you'll run into problems.

If you have a large number of part numbers then I would suggest you store the images in a table and relate them to the part number.  This would be best practices.
0
 
LVL 101

Assisted Solution

by:mlmcc
mlmcc earned 500 total points
ID: 39714203
The above is accurate.  For CR10 and before the image had to be in the database and inserted as a field.

For CR XI (v11) and later (CR2008, CR2011) you can use the graphic formatting option.

mlmcc
0

Featured Post

Free Tool: Subnet Calculator

The subnet calculator helps you design networks by taking an IP address and network mask and returning information such as network, broadcast address, and host range.

One of a set of tools we're offering as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

There have always been a lot of questions related to when Crystal Reports evaluates report components (such as formulas, summaries, cross-tabs, charts, to name a few examples). Crystal Reports uses a two-pass reporting process to provide greater …
Hello everyone, Hope you find this as helpful as we did. We have on the company I work for an application built in Delphi V with Crystal Reports 8. We all know that Crystal & Delphi can be temperamental sometimes and the worst thing is, nearly…
This is my first video review of Microsoft Bookings, I will be doing a part two with a bit more information, but wanted to get this out to you folks.
We’ve all felt that sense of false security before—locking down external access to a database or component and feeling like we’ve done all we need to do to secure company data. But that feeling is fleeting. Attacks these days can happen in many w…

721 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question