cancel
Showing results for 
Search instead for 
Did you mean: 

Display an image in crystal report that retrieve from folder in c#

0 Kudos

I want to display specific images located in a folder inside the project. I want to display it in a crystal report(dynamically). trying to insert an image as OLE object >> right click then format object >> choose picture tab >> click on a graphic location and write the following line:

{Application.StartupPath\images\1.jpg}

but didn't work. Again, I don't need to retrieve the path from the database, I need to retrieve images from the folder which I created. How can I achieve that? Thanks in advance.

DellSC
Active Contributor
0 Kudos

How do you know which image to show? Also, which version of Crystal and the .NET SDK are you using?

Accepted Solutions (1)

Accepted Solutions (1)

ido_millet
Active Contributor
0 Kudos

Your expression ({Application.StartupPath\images\1.jpg}) is not a valid Crystal syntax.

As sanity check, first create a formula that returns the path to the file. Place it on the report canvas and preview to confirm it returns a valid path. Then, use that formula in the Graphic Location expression.

Answers (1)

Answers (1)

0 Kudos

CR and SDK will only load the file on Open, it cannot be used to update the image at runtime.

You need to use a formula field or database field that specifies the file location.

Only way it's going to update at runtime