Solved

Insert image dependant on a variable field into Crystal Reports

Posted on 2013-12-11
4
572 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 101

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: SSL Checker

Scans your site and returns information about your SSL implementation and certificate. Helpful for debugging and validating your SSL configuration.

One of a set of tools we are providing to everyone 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

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…
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 …
In this brief tutorial Pawel from AdRem Software explains how you can quickly find out which services are running on your network, or what are the IP addresses of servers responsible for each service. Software used is freeware NetCrunch Tools (https…
Monitoring a network: why having a policy is the best policy? Michael Kulchisky, MCSE, MCSA, MCP, VTSP, VSP, CCSP outlines the enormous benefits of having a policy-based approach when monitoring medium and large networks. Software utilized in this v…

728 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