Total in Formula [message #206882] |
Fri, 01 December 2006 22:46 |
kamran.it
Messages: 265 Registered: September 2005 Location: Karachi
|
Senior Member |
|
|
I am using this code but row 2 not showing balance , showing null value.
Actual
:cs=row = Number of repeating rows.
Cf_2 = Opening balance (print one time on header)
cf_1 = quantity in repeating row
Quote: |
Opening Balance 1,000.00
Date Quantity Balance
1 01.01.2006 100.00 900.00
2 01.02.2006 100.00 800.00
3 01.03.2006 100.00 700.00
|
function CF_3Formula return Number is
bal number;
begin
if :cs_row = 1 or :cs_row =0 then
bal:=:cf_2-:cf_1 ;
return (bal);
elsif :cs_row > 1 then
return(bal-:cf_1);
end if;
end;
[Updated on: Fri, 01 December 2006 22:48] Report message to a moderator
|
|
|
Re: Total in Formula [message #206904 is a reply to message #206882] |
Sat, 02 December 2006 02:31 |
kamran.it
Messages: 265 Registered: September 2005 Location: Karachi
|
Senior Member |
|
|
Please see attached file. In this file you can see actual problem in balance KGS.
@ first Row == Opening KGS - Plan KGS = 32520 OK
@ 2nd row === First row Balance KGS - Plan KGS = Balance NOT OK
Problem is that..... & I used above mentioned formula.
OK Dear Thank your all of you.
sipmle I did that sum PlanKGS via summary column of repeating row -
then opening balance - summary column
[Updated on: Sat, 02 December 2006 03:25] Report message to a moderator
|
|
|
|
Re: Total in Formula [message #207265 is a reply to message #206920] |
Mon, 04 December 2006 21:53 |
ab_trivedi
Messages: 460 Registered: August 2006 Location: Pune, India
|
Senior Member |
|
|
hi kamran,
i am sending one rdf but i don't know how much it helps you... as i have seen your previous copy of you problem
where you have to do : 32520 - 660 = 32520
32520 - 600 = < this is not coming correct>
Try this...
Bye
Ashu
|
|
|
Re: Total in Formula [message #207295 is a reply to message #206882] |
Mon, 04 December 2006 23:49 |
gladiator
Messages: 21 Registered: April 2006 Location: Lahore, Pakistan
|
Junior Member |
|
|
Hello,
well guys try this solution.
Use a count function in the frame where u want to do a running total and just reset the value of ur running total variable in a formula column where count is equal to 1.
I am attaching the example file.
WISH U GOOD LUCK
good bye.
|
|
|