cancel
Showing results for 
Search instead for 
Did you mean: 

Insert bitmap image dynamically into Crystal Reports

Former Member
0 Kudos

Hello,

I read the post by Zack H and the response by Asha Lund.

Zack:

I apologize but I am new to creating dynamic formulas. You're correct in that the photos are stored in a folder on a network path outside the main database. I am not clear as to how I can link the report with the pictures in this folder and have it display the corresponding photo for each employee in the report?

If it is not too much to ask, can you give me more details on the procedure in getting this to work?

Asha:

You can insert bitmap image dynamically with the help of OLE object in Crystal Report.Mentioned below are the steps to insert OLE object

1)Click on Insert Menu

2)Click on OLE object.

3)3)If you have existing image the click on "Create from file."

4)Place the image in the section.

5)Right click the OLE image ->FormateGraphic->Picture Tab.

6)In Graphic Location pane(X-2) specify the path.

JC:

I was able to complete steps 1-5. However, I am bit confused with step 6?

I opened the Formula Workshop editor, and I see the "Picture2" object and

"Graphic Location" underneath it. The path to the .JPG file is stored in a database

field named "GRAPHIC_IMAGE". How do I connect the database field "GRAPHIC_IMAGE",

to "Picture2"? I dragged and dropped the GRAPHIC_IMAGE field into the

formual editor, and "Saved and Closed" the editor. But, when I "Refresh" the report

I do not see the image associated with the path and .JPG image that is stored in the

GRAPHIC_IMAGE field.

What step am I missing?

Thanks,

JC

Accepted Solutions (0)

Answers (1)

Answers (1)

Former Member
0 Kudos

Hi Jac,

What is the format in which the path is stored in your database?

Ex: The path should be like "C:\Folder\text.jpg".

Regards,

Vinay

Former Member
0 Kudos

Hi Vinay,

Thank you for taking the time to respond to my posting.

Previously, in the database field, I did not include the set

of double quotes around the path. However, this time I

hardcoded the path, in the Formula Editor, and included

the set of double quotes, and the image still did not display,

when I clicked the "Refresh Report Data" menu option.

I must be doing something fundamentally wrong.

Please advise,

-jc

Former Member
0 Kudos

Hi Vinay,

I have made some progress. I'm not sure what I did different this time,

but when I hardcode the path of the graphic image, I now see the image.

However, I'm now back to the original problem, when I replaced the hardcoded

path with the database field (which now has the set of double quotes). I still

do not see the image, when I click the "Refresh Report Data" menu option.

Do I need to insert a special character before the database field?

Formula Editor information: (contains path of graphic image)

{ONM_DATA_INFO.GRAPH_IMAGE}

Thanks,

-jc

Former Member
0 Kudos

Hi Vinay,

Please disregard my previous posting, the report is now being displayed with

the path and filename from the database field. The problem was the set of

double quotes that I incorrectly added in the database field. Once, I removed

the set of double quotes, the graphic image displays OK.

Thanks again,

-jc