imanol00 Posted January 17, 2007 Share Posted January 17, 2007 Hello, JasperFriends! It´s quite a long time since I wrote for the last time in this forum but now I'm creating my second Java application using reports, new problems come to me. The thing is very simple: I want to access to the value of the elements in my report, such as textFields or staticTexts (these are located in the Document Structure Tree, at the right side of the iReport screen by default). I need to do this because I can't do a very simpler thing, which is the main cause of my problem (and the one that I think it could be solved): I can't compare the values of 2 variables created by myself: "currentReg" and "totalReg". The first one, currentReg, has the value of REPORT_COUNT variable, and its Reset Type with the Report value selected. The second one, totalReg, has the value of REPORT_COUNT variable too, but its Reset Type has the None value selected. What is the problem? The problem is that I can't compare those 2 variables because the comparison always gives me true as result, they both have the same value (REPORT_COUNT), but in different Reset Type... Does anybody know anything about this?? Thanks in advance!Post edited by: imanol00, at: 2007/01/16 16:52 Link to comment Share on other sites More sharing options...
schaibaa Posted January 17, 2007 Share Posted January 17, 2007 While I can't answer your question directly, I may be able to help with some explanation - sorry if this is knowledge you already have. Reset Type indicates when the variable will be reset to whatever is in the initial value, or null if it is blank. The only difference between reset types "none" and "report" is that if you select "none" the initial value expression will always be ignored. Hope this helps Link to comment Share on other sites More sharing options...
jmurray Posted January 17, 2007 Share Posted January 17, 2007 If you are after a "record i of n" solution then you could easily adapt the "page i of n" example provided in the JasperReports FAQ: http://jasperforge.org/sf/wiki/do/viewPage/projects.jasperreports/wiki/FAQ7 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