itchytoes Posted March 10, 2011 Share Posted March 10, 2011 HI all --I searched for "percent of total" in the forums as well similar phrases and could not find out how to do this.I tried many things, and figured that I should be able to make it work.I just have some detail rows, each with a field called "count". I can compute a variable called "totalCount", but I want to display the count as a percentage of totalCount for each detail row.I've tried various incarnations of evaluationTime for the percentage text field, but nothing works. If I set it to "Group", I get the percentage as the value based on count of the last detail row for all my rows. Using "Auto" does not help, although saw postings that said to use "Auto".Am I missing something or doing something stooopid? (After all these years of working with JasperReports, I don't think I've ever tried to do this one thing). ThanksBetty Link to comment Share on other sites More sharing options...
ernestoo Posted March 11, 2011 Share Posted March 11, 2011 Hey itchytoes! I agree - doing this is not as trivial as one would think.I wrote up a little tutorial on the topic, please find it here:http://jasperforge.org/plugins/mwiki/index.php/Jasperserver/Creating_A_Percent_Of_Field Link to comment Share on other sites More sharing options...
itchytoes Posted March 16, 2011 Author Share Posted March 16, 2011 Hi -- thanks for responding, and for your excellent tutorial. I followed the simple JasperReports method of using the "Auto" and I got it working. Oddly enough, I had problems with it when I tried doing it that way earlier. Something was different, but I'm not sure what. At any rate, I'm good for now Link to comment Share on other sites More sharing options...
marianol Posted April 16, 2015 Share Posted April 16, 2015 Here is the new location of the tutorial @ernestoo is talking about http://community.jaspersoft.com/wiki/creating-percent-field this may be a bit outdated since a lot has changed since JRS 4.0 but is here for reference. Link to comment Share on other sites More sharing options...
lbor Posted June 23, 2017 Share Posted June 23, 2017 Very useful, but one crucial bit of information is missing from the "subreport-method": The sum variable in the main report has to have its Calculation set to "System" - cost me a few hours of desperation. 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