Home » Developer & Programmer » Reports & Discoverer » call Function in oracle Report
call Function in oracle Report [message #679769] Wed, 25 March 2020 01:39 Go to next message
haider_1pk
Messages: 111
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
Re: call Function in oracle Report [message #679770 is a reply to message #679769] Wed, 25 March 2020 06:06 Go to previous message
cookiemonster
Messages: 13894
Registered: September 2008
Location: Rainy Manchester
Senior Member
Well you can call it direct from the report query, or you can add a formula column and call it from that
Previous Topic: Reading Image in the Reports.
Next Topic: FRM-41214: Unable to run report
Goto Forum:
  


Current Time: Tue Jun 02 00:08:05 CDT 2020