cancel
Showing results for 
Search instead for 
Did you mean: 

A picture based on a formula

Former Member
0 Kudos

Hello,

I am trying to get my report to have a specific picture pulled based on whether the customer has approved credit or not. This is the formula I created: "C:\Users\Karen James\Desktop\Crystal Reports\Graphics" + {@Approved or not 2} + ".jpeg"

In the graphics folder I have 2 pictures. One called "Approved" and the other "NotApproved". The formula {@approved or not 2} pulls the field in my database and gives the response "Approved" or "NotApproved"

But when I do the print preview, all customers have the same approved picture no matter what their credit report status was.

Can anyone tell me what I am doing wrong?

Thanks!

Accepted Solutions (1)

Accepted Solutions (1)

abhilash_kumar
Active Contributor
0 Kudos

Hi Karen,

Try changing the formula to:

"C:\Users\Karen James\Desktop\Crystal Reports\Graphics\" + {@Approved or not 2} + ".jpeg"


I just added a "\" after 'Graphics'.


-Abhilash

Former Member
0 Kudos

I just tried that, and it's still not changing the picture. Any other suggestions?

abhilash_kumar
Active Contributor
0 Kudos

OK. Does this formula display the 'Not Approved' image:

"C:\Users\Karen James\Desktop\Crystal Reports\Graphics\NotApproved.jpeg"


-Abhilash

Former Member
0 Kudos

Nope...

abhilash_kumar
Active Contributor
0 Kudos

Are you sure the image is called 'NotApproved.jpeg'?

If you open the windows explorer and paste the same path as above, does that open the image?

-Abhilash

Former Member
0 Kudos

Thank you!!! It now works!

Answers (1)

Answers (1)

Former Member
0 Kudos
abhilash_kumar
Active Contributor
0 Kudos

Try:

"C:\Users\Karen James\Desktop\Crystal Reports\Graphics\" + {@Approved or not 2} + ".jpg"


The extension should be .jpg not .jpeg.


-Abhilash