slavicekpavel Posted August 10, 2016 Share Posted August 10, 2016 Hello, I have a question. I am a beginner in jasper and I have to know if is difference in performance between defining an image in a template static or dynamicaly via parameter.For example I can define the image in template like this:1) setting parameterURL url = this.getClass().getClassLoader().getResource("pdf/my_image.tif");parameters.put("logo", url);[/code]declaration in a template<parameter name="logo" class="java.net.URL"> <defaultValueExpression><![CDATA[]]></defaultValueExpression></parameter>[/code]usage in a report/template<image> <reportElement x="100" y="30" width="135" height="30"/> <imageExpression><![CDATA[$P{logo}]]></imageExpression></image>[/code]2) defines the path in the template<imageExpression class="java.lang.String"> <![CDATA[$P{REPORTS_DIR} + "/images/logo.jpg"]]></imageExpression>[/code]Is needed compiling the template repeatedly (see 1)? Is difference between 1 and 2 in performance? Thank you in advancePavel Slavicek 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