It looks like you are trying to do something called "recursion" - you are trying to base your calculation on the result of a calculation that happened on a previous line. Your method would have to be smart-enough to know this. For each line on your output - you would need to have the method start at the "first" line, and calculate up-to the line you are "on". If that makes any sense.
--- In Axapta-Knowledge-Village@yahoogroups.com, "dantinada" <ananth_mist1...@...> wrote: > > Dear members > I have done a report in which I put a field of calculated value(written a > logic in display method for CurrentMarginAmt) to display for a particular > ID. > > It is giving correct for first row only, it is not considering calculation > method for second record of same ID. > > So please provide me some code & method to get the calculated value for each > line of that particular ID, as shown below > > > LCNo123 PaidAmts MArginAmt CurrentMarginAmt > 75000 10000 10000-7500(10% of 75000) 2500.00 > 25000 2500 -2500(10 % of 25000) 0.00 > > > As in top arrangement I got 2500 only I could not get second row i.e 0.00 > for the field CurrentMarginAmt. > > 1st line current margin Amt is (MarginAmt - % of 1 st line paidAmts) > 2nd line current margin Amt will be 1st line CurrentMarginAmt- % of 2 nd > line paidAmts)... > It will be updated for all rows as said. > Please ask me more details if u can't get clearly... Thanks & regards >