beekerc69 Posted November 23, 2015 Share Posted November 23, 2015 Can someone explain the difference in the 5 options you get when you create a new image element in JasperSoft StuidoAnd most specifically, can someone provide examples of how to use the "Custom Expression".is the expression used to create the path and name of the image file? (dynamic selection)Oris the expression used (like a Case statment) to select from a set of hard coded image files (resources)?Examples would be greatThanks in advance Link to comment Share on other sites More sharing options...
elizam Posted November 23, 2015 Share Posted November 23, 2015 I don't actually know, but here's the JasperReports reference on images:http://jasperreports.sourceforge.net/sample.reference/images/index.htmlBy default an expression is Java. (You can also set it to Groovy or JavaScript) I'm guessing you can do anything in that Java, as long as you return one of the listed legal return types.Image Expression The value returned by the image expression is the source for the image to be displayed. The image expression is introduced by the <imageExpression/> element and can return values from only the limited range of classes listed following:java.lang.Stringjava.io.Filejava.net.URLjava.io.InputStreamjava.awt.Imagenet.sf.jasperreports.engine.JRRenderable Link to comment Share on other sites More sharing options...
hozawa Posted November 24, 2015 Share Posted November 24, 2015 CustomExpression is used to retrieve image dynamically. For example, it image file name is in the database, put the field name here to get a different image for each row - example: product images in a list. Workplace is just a folder within your Jaspersoft Studio workspace. Absolute Path is a absolute path (e.g. C:imagesjasperlogo.png), URL is to retrieve image on the web (just enter the uri of the image you can access from the web browser, No Image is to just put an Image component without specifying any image yet - needs to set image before generating report. 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