2001 JI Open Discussion Posted August 14, 2006 Share Posted August 14, 2006 By: yan orel - yanorel Calculated data on group footer 2002-07-01 07:18I have to put a custom calculated image on a group footer. I didn't find the right event to handle the computing of the image. I continue getting a java.lang.NullPointerException at java.awt.Toolkit.createImage(Toolkit.java:705) This is a part of xml: <variable name="ImageVar" class="java.awt.Image" calculation="System"></variable> --- This in the group footer (the only) <image scaleImage="Clip" evaluationTime="Group" evaluationGroup="HourGroup"><reportElement x="190" y="3" width="300" height="5"/><graphicElement/> <imageExpression class="java.awt.Image"><![CDATA[$V{ImageVar}]]></imageExpression></image> By: Teodor Danciu - teodord RE: Calculated data on group footer 2002-07-04 08:38 Hi, Unfortunately, there is no event handler for group, column or page footers in scriptlets. In fact, what happens is that footers are always printed before headers, so they don't have an event for themselves. There are event callbacks only when groups, columns or pages start. I'll study this issues more thoroughly, but is not a simple problem. You have to treat every row in the data source like it would be the last on the page, on the group, or whatever. This would imply that you recalculate your image with every new detail hoping that the group end will be reached and thus the current image used on the group footer. I know this will pose performance problems, but the only thing I can promise is that I'll look into this to come up with a better solution. Thank you, Teodor By: yan orel - yanorel RE: Calculated data on group footer 2002-07-05 04:06Thank you for the reply. I solved my problem handling the groups in a better way working with the group footers. 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