Author |
Message |
aaron80126
Newbie
Joined: 07 Mar 2016
Online Status: Offline
Posts: 14
|
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 Logged |
|
Valert16
Groupie
Joined: 21 Mar 2016
Location: Spain
Online Status: Offline
Posts: 57
|
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 Logged |
|
aaron80126
Newbie
Joined: 07 Mar 2016
Online Status: Offline
Posts: 14
|
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 Logged |
|
Valert16
Groupie
Joined: 21 Mar 2016
Location: Spain
Online Status: Offline
Posts: 57
|
Posted: 19 Apr 2016 at 6:06am |
Sorry, you are right. What about this syntax:
"C:\Isometrics\" & {Table.Widget#}
|
IP Logged |
|
aaron80126
Newbie
Joined: 07 Mar 2016
Online Status: Offline
Posts: 14
|
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 Logged |
|
Valert16
Groupie
Joined: 21 Mar 2016
Location: Spain
Online Status: Offline
Posts: 57
|
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 Logged |
|
|