Solved

Insert image dependant on a variable field into Crystal Reports

Posted on 2013-12-11
4
569 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 125 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 125 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.
0
 
LVL 26

Accepted Solution

by:
Kurt Reinhardt earned 125 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 100

Assisted Solution

by:mlmcc
mlmcc earned 125 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

Suggested Solutions

I hate sub reports and always consider them the last resort in any reporting solution.  The negative effect on performance and maintainability is just not worth the easy ride they give the report writer.  Nine times out of ten reporting requirements…
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…
Finds all prime numbers in a range requested and places them in a public primes() array. I've demostrated a template size of 30 (2 * 3 * 5) but larger templates can be built such 210  (2 * 3 * 5 * 7) or 2310  (2 * 3 * 5 * 7 * 11). The larger templa…
I've attached the XLSM Excel spreadsheet I used in the video and also text files containing the macros used below. https://filedb.experts-exchange.com/incoming/2017/03_w12/1151775/Permutations.txt https://filedb.experts-exchange.com/incoming/201…

738 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