call Function in oracle Report [message #679769] |
Wed, 25 March 2020 01:39 |
haider_1pk
Messages: 135 Registered: March 2009 Location: PAKISTAN
|
Senior Member |
|
|
Hello Friends,
I have make function of opening Balance and added to parameters to_date and code1.
create or replace
FUNCTION OP_bal(To_date Date,dcode1 in number)
return number is
v_total number;
tk_total number;
s_total number;
begin
SELECT sum(nvl(ADJUSTED_AMOUNT,0)) +sum(nvl(TO_BE_ADJUSTED,0)) +sum(nvl(T_out,0)) Total_out
into v_total FROM CUSTOMER_RECEIPT_DETAIl
WHERE dcode =dcode1 and wdate < to_date ;
select sum(nvl(A,0)) stock into tk_total from stock_detail
where bsnes =dcode1 and wdate < to_date ;
s_total:=(nvl(tk_total,0))-(nvl(v_total,0));
return s_total;
end;
Kindly guide me, how i can execute it in oracle report.
Thanks and Regards
Haider
|
|
|
|