rbojja Posted December 12, 2008 Share Posted December 12, 2008 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 More sharing options...
C-Box Posted December 12, 2008 Share Posted December 12, 2008 $F{StoreName}.equals("ABC")?"YourImageABC.jpg":"YourImageDEF.jpg" just be creativeC-Box Link to comment Share on other sites More sharing options...
rbojja Posted December 15, 2008 Author Share Posted December 15, 2008 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 More sharing options...
rbojja Posted December 15, 2008 Author Share Posted December 15, 2008 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 More sharing options...
rbojja Posted December 15, 2008 Author Share Posted December 15, 2008 it always displays only one image....not following the condition Link to comment Share on other sites More sharing options...
rbojja Posted December 15, 2008 Author Share Posted December 15, 2008 now its ok .... :) Link to comment Share on other sites More sharing options...
chambergame Posted December 19, 2017 Share Posted December 19, 2017 Great that "now it's ok", but you didn't post a solution...For me following option worked: $F{StoreName}=="ABC"?"YourImageABC.jpg":"YourImageDEF.jpg" Link to comment Share on other sites More sharing options...
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now