Jump to content
We've recently updated our Privacy Statement, available here ×

display images based on condition


rbojja

Recommended Posts

HI,

 i have a requirement to show the image/logo on the report. If i get store name as ABC then show an image/logo else if store name is some xyz show another image/logo.

How should i display the image at the same location on the report based on the above condition?

 

 

Link to comment
Share on other sites

  • Replies 6
  • Created
  • Last Reply

Top Posters In This Topic

Top Posters In This Topic

 hello,

$F{StoreName}.equals("ABC")?"YourImageABC.jpg":"YourImageDEF.jpg" is what i tried.But issue is how to get the location of the image to display.

 

I tried as $F{StoreName}.equals("ABC")?"C:\Images\YourImageABC.jpg":"C:\Images\YourImageDEF.jpg" ...but it is not displaying any image. it only prints the image name for the condition...am i missing any thing?

should i try with image field or text field?

 

Link to comment
Share on other sites

 got it .. under image tab - > image expression i added this expression...and got the result.

$F{banner}.equals("Rogers & Hollands")?"C:\Receipts_Stores_New\AOLOGO-w-dia--Con_small.jpg":"C:\Receipts_Stores_New\RH-LOGO-w-dia--(2)_small.jpg"

Link to comment
Share on other sites

  • 9 years later...

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

×
×
  • Create New...