raul.mendez Posted October 6, 2014 Share Posted October 6, 2014 Hi,I'm trying to have a variable that displays the total of products, so I have the following:Parameter: stock_initial (The quantity initial)Variable input: stock_in (This return the quantity of an input product)Variable output: stock_out (This return the quantity of a output product)Initial stock43 InputsOutputsTotal 0103343-10=331504833+15=48So I want to create a variable to get values on total column (green values), I tried to do the following but this does not work:$V{Stock_total}:Initial value expression: $P{stock_initial}Variable expression: $V{stock_input} >= 0 ? ($V{Stock_total} + $V{stock_input}) : ($V{Stock_total} - $V{stock_output})Calculation: NothingThe variable should calculate the initial value and add or subtract of input or output and display result, for the second line the result of the variable should be used to do a new calculation. I hope someone help me.Thank you in advance. Link to comment Share on other sites More sharing options...
Solution rajesh.sirsikar Posted October 15, 2014 Solution Share Posted October 15, 2014 Hi Raul,I have addressed your perticular problem in my blog http://www.rajeshsirsikar.com/creating-running-total-in-jaspersoft-studio/Check it out !!Thanks,Rajesh Sirsikar Link to comment Share on other sites More sharing options...
rajesh.sirsikar Posted October 15, 2014 Share Posted October 15, 2014 Hi raul, Check the answer below Link to comment Share on other sites More sharing options...
rajesh.sirsikar Posted October 15, 2014 Share Posted October 15, 2014 Thanks Raul. I am glad that it solved the issue. Link to comment Share on other sites More sharing options...
raul.mendez Posted October 15, 2014 Author Share Posted October 15, 2014 Thanks Rajesh, I did all displayed in your website and this work as expected, so this is solved. Thank you for your help and great website. 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