gan Posted March 22, 2007 Share Posted March 22, 2007 I am trying to build a report with running percentage.A "sum" variable evaluated "now" will effectively calculate a running sum of a field. The same variable, evaluated "report" will provide the total sum. How can I divide the running sum with the total sum, i.e. calculate and display the running percentage? I am including an example report.[file name=RunPerc-c837e9154419bf47250c4e8bb940853a.jrxml size=12551]http://www.jasperforge.org/components/com_joomlaboard/uploaded/files/RunPerc-c837e9154419bf47250c4e8bb940853a.jrxml[/file] Thanks in advance for the help. Link to comment Share on other sites More sharing options...
lucianc Posted March 22, 2007 Share Posted March 22, 2007 You can achieve this using Auto evaluation type for the text field. As Auto uses the variable's reset type to determine its evaluation time, you'll have to copy the value of the sum variable into a variable having resetType="None" to use it as the current sum value. I'm attaching a simple report illustrating this. Fill it with new JREmptyDataSource(10) to see the result. HTH,Lucian [file name=runningPercentage.jrxml size=2077]http://www.jasperforge.org/components/com_joomlaboard/uploaded/files/runningPercentage.jrxml[/file] Link to comment Share on other sites More sharing options...
gan Posted March 23, 2007 Author Share Posted March 23, 2007 Thank you very much, that solved my misery :)Gan Link to comment Share on other sites More sharing options...
glen Posted February 8, 2009 Share Posted February 8, 2009 Lucianc,Thank you for the jrxml example. That's exactly the sort of help that I needed to get to grips with running percentages. I have been through all the Admin and Ultimate guides and this was the thing that solved it for me. Much appreciated. 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