Home » Developer & Programmer » Reports & Discoverer » capture the last accumulated column (Reports)
capture the last accumulated column [message #406141] Tue, 02 June 2009 08:31 Go to next message
arif_md2009
Messages: 732
Registered: May 2009
Location: United Arab Emirates
Senior Member

Hi can anyone tell me how i can capture the last accumulated value from the report.I m using one formula column as below.

begin
IF NVL(:CS_SRNO,0) < 1 THEN
:CP_RUNNING_BAL:=0;
ELSE
:CP_RUNNING_BAL:=NVL(:CP_RUNNING_BAL,0)+NVL(:STOCK_QTY,0);
:CP_1:=:CP_RUNNING_BAL;

END IF;
RETURN 1;

END;

what i am doing is i am checking the serial number.if the serial number is greater than 1 it will add the cumulative totals of stock_qty.but the requirement is i want to find the percentage %of each cumulative total that is last cumulative value / line cumulative value.is that possible.

Re: capture the last accumulated column [message #406233 is a reply to message #406141] Tue, 02 June 2009 23:17 Go to previous messageGo to next message
vamsi kasina
Messages: 2112
Registered: October 2003
Location: Cincinnati, OH
Senior Member
Quote:
:CP_RUNNING_BAL:=NVL(:CP_RUNNING_BAL,0)+NVL(:STOCK_QTY,0);
What is the issue here?
You have last cumulative already in your hand. (NVL(:CP_RUNNING_BAL,0) the one in the right side of :=)
You can do whatever you want.

By
Vamsi

[Updated on: Tue, 02 June 2009 23:18]

Report message to a moderator

Re: capture the last accumulated column [message #406258 is a reply to message #406233] Wed, 03 June 2009 01:17 Go to previous message
arif_md2009
Messages: 732
Registered: May 2009
Location: United Arab Emirates
Senior Member

thanks vamsi i have resolved this issue.It was about getting average of all the items.
Previous Topic: button in report
Next Topic: Compile Oracle Graphics thru Command Line
Goto Forum:
  


Current Time: Sat Nov 30 06:26:32 CST 2024