rromine Posted July 1, 2011 Share Posted July 1, 2011 Okay so here is the problem. I have a report that tracks shipment with three options. The following below needs to be options that will show an image (which is a checkbox) :______________________________________________Freight Terms:Prepaid: (no data)Collect: (no data)3rd Party: (this needs to be check marked with an image since the product is third party)__________________________________________Please use the image as a reference! Thank you so much. And please be specific as possible. Should it be a boolean value? etc. and what field to put it in. I assume its a conditional statement, I jsut dont know how to make a picture "VISABLE" or enabled. Link to comment Share on other sites More sharing options...
rromine Posted July 8, 2011 Author Share Posted July 8, 2011 Still no replies?? awl I was really hoping with all the documentation this would be easy for someone to help solve this with me. Link to comment Share on other sites More sharing options...
jmurray Posted July 11, 2011 Share Posted July 11, 2011 Place the check mark image where you want it to be displayed, then set the printWhenExpression appropriately:eg. ( $F{Method}.compareTo("Third Party")==0 )If you aren't positive about whether the case will always be the same then force the strings on both sides of the comparison to either upper or lower case.If you can't be sure that source string won't contain leading or trailing whitespace then use the .trim() function to be absolutley sure. Link to comment Share on other sites More sharing options...
rromine Posted July 12, 2011 Author Share Posted July 12, 2011 Sill need help because!The report still compiles when I added that print when expression, but it does not show the image, I also added a lable with that property and that is not displaying either.BTW: If I add any new labels they compile so I know there appears to be nothing wrong with the report except that the boolean expression is just not working.Maybe I can help you with some more details. See below:Attachment 1: Shows the image I want to print when 3rd party function is true, Print when Expression is used with $F{BillTo}.compareTo("Third Party") == 0do you see the red squiggly... wonder what it means lolhttps://learn.usf.edu/bbcswebdav/xid-3659822_1Attachment 2: Function BillTo --> look at the X image (which doesn't show on attachment 4) but then notice 3rd Party: --> $F function that goes to BillTo, that shows as true! lolis this a logic error it appears to be :/https://learn.usf.edu/bbcswebdav/xid-3659823_1Attachment 3: XML page I am grabing from, or just look at link below to see full xmlhttps://learn.usf.edu/bbcswebdav/xid-3659821_1Attachment 4: Report being run [iReport output]https://learn.usf.edu/bbcswebdav/xid-3659824_1Attachment 5 see link!: IDE Log showing missing reference errors, not sure what that is, but i doubt it is relevanthttps://learn.usf.edu/bbcswebdav/xid-3659820_1Thank you! I have put a lot of work into it, and I am working on other forms. But this is really bugging me! Hope the extra material helps and is not annoying. Link to comment Share on other sites More sharing options...
jmurray Posted July 12, 2011 Share Posted July 12, 2011 Your printWhenExpression is still incorrect. Remember that it is a snippet of embedded Java, so you have to be very explicit about what you are doing. If there's one thing Java excels at it's semantics.new java.lang.Boolean( $F{Method}.compareTo("Third Party")==0 ) Link to comment Share on other sites More sharing options...
rromine Posted July 12, 2011 Author Share Posted July 12, 2011 You're a life saver, I had just realized you wanted to create a new method lol Thank you for your time and patience. 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