marlin_snyder Posted December 5, 2013 Share Posted December 5, 2013 I have a report using many variables to calculate a rolling inventory over 16 months. The users are requesting some difficult calculations in the rolling (or carryover) such as only carryover amounts > 0, but only for some categories(groups), and then add the carryover from one category to the carryover in another category. I have most of the issues worked out, but I need to set a variable for the carryover ONLY when the group ="XXX", and maintain that variable value even when the group changes. I can easily set the variable to change over categories (groups) $F{group1}=="XXX"?QTY_ON_HAND - QTY_ORDERED:0.0, but when the group changes to "YYY" and then to "ZZZ" the value of the variable changes to 0. I need to use the value of the varialble when it is in the "XXX" group as part of the calculation when it gets to group "ZZZ", but if it resets to 0 at that time, it is useless.I have the Calculation set to "No Calculation", Increment and Reset types set to "None"I am using Studio 5.5, but the same would apply to IReport Designer.Thank you for your assistance.Marlin Snyder I have tried setting the Calculation Type to "First" and various settings on the Reset Type. Group will set the value to 0. None sets the value correctly, but it still changes with each group change. Link to comment Share on other sites More sharing options...
bschundawat143 Posted December 6, 2013 Share Posted December 6, 2013 You need to set reset type to Report.Then it will come and also set calculation type none.If you have top level group then you can set it to group. Link to comment Share on other sites More sharing options...
marlin_snyder Posted December 6, 2013 Author Share Posted December 6, 2013 I thought I had tried all combinations of reset type, calculation type and increment type. Just to make sure, i went back and set them as recommended. The variable still changes with each group. Thank you for the suggestion. 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