Technical Questions
 Crystal Reports Forum : Crystal Reports 9 through 2020 : Technical Questions
Message Icon Topic: Add Dynamic Images to Report Post Reply Post New Topic
Author Message
aaron80126
Newbie
Newbie
Avatar

Joined: 07 Mar 2016
Online Status: Offline
Posts: 14
Quote aaron80126 Replybullet Topic: Add Dynamic Images to Report
    Posted: 19 Apr 2016 at 3:47am
Greetings . . . I need to add an image of a widget, which is based on the widget # field. The images reside on a separate folder on the server, not in the database.

So, if my report is for widget # XYZ-123, CR would pull in the image named XYZ-123.bmp from the folder named Isometrics.

I have my OLE object box set up in the report, but I don't know how to write the CR syntax in the Format Editor / Graphic Location formula area.

Could you please point me to a resource that deals with this or provide me with an example of the syntax? I couldn't find a topic on the forum addressing this question.

Thanks!

Edited by aaron80126 - 19 Apr 2016 at 4:18am
aaron80126
IP IP Logged
Valert16
Groupie
Groupie
Avatar

Joined: 21 Mar 2016
Location: Spain
Online Status: Offline
Posts: 57
Quote Valert16 Replybullet Posted: 19 Apr 2016 at 5:51am
For example, the Graphic Location formula could be (crystal syntax):
"C:\Isometrics\XYZ-123.bmp"

Rewrite with the correct path.
IP IP Logged
aaron80126
Newbie
Newbie
Avatar

Joined: 07 Mar 2016
Online Status: Offline
Posts: 14
Quote aaron80126 Replybullet Posted: 19 Apr 2016 at 6:02am
Thanks for your reply, Valert16. The widget # part of the file path needs to be a variable based on the widget # field, since each widget / corresponding image is unique. Therein lies the challenge (at least for me).
aaron80126
IP IP Logged
Valert16
Groupie
Groupie
Avatar

Joined: 21 Mar 2016
Location: Spain
Online Status: Offline
Posts: 57
Quote Valert16 Replybullet Posted: 19 Apr 2016 at 6:06am
Sorry, you are right. What about this syntax:
"C:\Isometrics\" & {Table.Widget#}
IP IP Logged
aaron80126
Newbie
Newbie
Avatar

Joined: 07 Mar 2016
Online Status: Offline
Posts: 14
Quote aaron80126 Replybullet Posted: 19 Apr 2016 at 7:36am
Works great . . . thanks. Now if I can just figure out how to get images of different sizes to fit proportionally in the OLE boxes! Reading multiple sources, it looks like the only way to handle that is at the image creation point.
aaron80126
IP IP Logged
Valert16
Groupie
Groupie
Avatar

Joined: 21 Mar 2016
Location: Spain
Online Status: Offline
Posts: 57
Quote Valert16 Replybullet Posted: 19 Apr 2016 at 7:50am
Getting images to fit proportionally is not possible with CR. It's a feature long awaited by CR users but, at present, I think there's no way to achieve this. Sorry for these bad news.
IP IP Logged
Post Reply Post New Topic
Printable version Printable version

Forum Jump
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot delete your posts in this forum
You cannot edit your posts in this forum
You cannot create polls in this forum
You cannot vote in polls in this forum



This page was generated in 0.031 seconds.