how to write CF in the Report [message #618734] |
Tue, 15 July 2014 02:34 |
|
mist598
Messages: 1195 Registered: February 2013 Location: Hyderabad
|
Senior Member |
|
|
Hi all,
I need TO call xxc_pkg.xxc_date(item_id)
But i am getting error LIKE the "xxc_date function returned without value"
THEN ,I need TO CREATE CF COLUMN FOR DATE COLUMN TO display IN the SELECT query.
But IN the CF(IN the data model)
function CF_DateFormula return Date is
v_date DATE;
BEGIN
SELECT Max(date)
INTO v_date
FROM x,y
WHERE a.item_id = p_item_id;
EXCEPTION
WHEN OTHERS THEN
v_date := NULL;
END;
I am passing p_item_id AS parameter.But IN the SELECT query IN the Data Model,
selet col1,
col2,
col3
FROM x,y,z
WHERE x.cust_id=:p_cust_id.
FOR these i should CREATE 2 USER parameter's as p_item_id,p_cust_id right?
I need TO CREATE concurrent program FOR this Report AND pass 2 p_item_id,p_cust_id
But this NOT corret , i want TO pass ONLY p_cust_id
how TO DO this?
Thanks
|
|
|
|
Re: how to write CF in the Report [message #618753 is a reply to message #618737] |
Tue, 15 July 2014 04:09 |
|
mist598
Messages: 1195 Registered: February 2013 Location: Hyderabad
|
Senior Member |
|
|
Quote:
You main problem is that function(s) you write end (either successfully or not ("not" being the exception handler section)) without returning a value.
Make sure that RETURN statement(s) exist.
Hi Littlefoot, i have created function in the Database in the package(with return type in the Function)
i am trying to call like below
select clo1,
item_id
xxc_pkg.xxc_date(item_id)
from x,y,z
where x.cust_id=:p_cust_id.
I am getting error "xxc_date function returned without value"
And
function CF_DateFormula return Date is
v_date DATE;
begin
SELECT Max(date)
INTO v_date
FROM x,y
WHERE a.item_id = p_item_id;
return(v_date );
end;
In the above query i am passing parameter as p_item_id, should create in the user parameter right? But if i pass p_cust_id &p_item_id i am getting only one record(row) data.So, that's why i need to pass only p_cust_id
And
select clo1,
item_id,
-- xxc_pkg.xxc_date(item_id)
CF_DateFormula
from x,y,z
where x.cust_id=:p_cust_id.
|
|
|
|
|
|
|
|