Go Premium for a chance to win a PS4. Enter to Win

x
?
Solved

Insert image dependant on a variable field into Crystal Reports

Posted on 2013-12-11
4
Medium Priority
?
607 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
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: 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

Crystal Reports: 5 Tests for Top Performance It is complete, your masterpiece report.  Not only does it meet your customer’s expectations, it blows them out the water, all they want is beautifully summarised and displayed in a myriad of ways. …
Hot fix for .Net Crystal Reports 10.2.3600.0 to fix problems with sub reports running on 64 bit operating systems ISSUE: Reports which contain subreports fail with error "Missing Parameter Value" DEPLOYMENT SERVER OS: Windows 2008 with 64 bi…
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…
This lesson discusses how to use a Mainform + Subforms in Microsoft Access to find and enter data for payments on orders. The sample data comes from a custom shop that builds and sells movable storage structures that are delivered to your property. …
Suggested Courses

926 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