srikanth1229 Posted October 3, 2009 Share Posted October 3, 2009 hiHow to add objects to java.util.list in IREPORT.I want to add the "ASSETS","LIABILITIES","NETWORTH" (these are strings) to util list.i want to pass the util list to barchart as category expression.please help me.. thanks in advance....:-) Link to comment Share on other sites More sharing options...
srikanth1229 Posted October 6, 2009 Author Share Posted October 6, 2009 please help me to acheive this.... Link to comment Share on other sites More sharing options...
mdahlman Posted October 6, 2009 Share Posted October 6, 2009 srikanth1229, I don't understand what you are trying to do. Perhaps others are having the same problem. Could you post a much more detailed description of what you are trying to achieve? Regards,Matt Link to comment Share on other sites More sharing options...
srikanth1229 Posted October 7, 2009 Author Share Posted October 7, 2009 Hi matt Thanks for Replying.. :-) Actually, I want to draw the bargraph. for that, category expression is required. Suppose In the table i have the data like this Assets Liabilites Networth 5000 3000 2000 I want to pass the category expression as Assets , Liabilites,Networth. but these are column names. Please find the attached image for clear description. Link to comment Share on other sites More sharing options...
gilclefes Posted October 9, 2009 Share Posted October 9, 2009 check this it may help : http://gilbertadjin.wordpress.com/2009/08/09/charting-with-jasper-reports/ Link to comment Share on other sites More sharing options...
maddie090 Posted July 8, 2010 Share Posted July 8, 2010 I know this is an old topic and the question maybe solved or the topicposter may have past away already, but i just found this topic while i had the same problem. 10 minutes after reading this i found a shortcut to the solution, which i like to share. If you have a query that gives you values and some unwanted items that you can't or won't use in your graph and you want other category "words" than you can do the following (at least if you know what the unwanted words are.) Lets say you have query that returns data for three bargraphs, something like this arrayArray = { ["Milk","200"],["Lemonade", "300"], [ "Cola", "100"] } we don't want the words Milk, lemonade and Cola to be seen by our collegues, so we need to change them to "beer", "wiskey", "Wodka". just add the following to the categories expression:$F{type}.equals("Milk") ? "Beer" : ( $F{type}.equals("Lemonade") ? "Wiskey" : ( $F{type}.equals("Cola") ? "Wodka":""))this will render the graph with you favorite drinks and words. (of course the 3 words milk, lemonade and cola need to be in this sequence otherwise the comparence will not start...) 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