REP-1401 and rep-0619 [message #444619] |
Tue, 23 February 2010 01:38 |
dhinendra
Messages: 58 Registered: September 2009 Location: Gurgaon,India
|
Member |
|
|
hi to all
I was creating a report by using formula column.
in my formula column the code is like that-
function APRFormula return Number is
N1 NUMBER;
begin
SELECT COUNT((SUBSTR(VOUCHERCODE,1,4))) INTO N1 FROM VOUCHERS
WHERE UNITCODE='UC1' AND FYCODE='FY-03'
AND TO_CHAR(VOUCHERDATE ,'MM/YY')='04/09'
AND VOUCHERTYPE LIKE :VOUCHERTYP
AND (SUBSTR(VOUCHERCODE,1,4)) LIKE :CODE
GROUP BY (SUBSTR(VOUCHERCODE,1,4)),VOUCHERTYPE;
RETURN N1;
end;
and my main query is-
SELECT VOUCHERTYPE,(SUBSTR(VOUCHERCODE,1,4)) FROM VOUCHERS
WHERE UNITCODE='UC1'
AND FYCODE='FY-03'
AND VOUCHERTYPE LIKE :VOUCHERTYP
AND (SUBSTR(VOUCHERCODE,1,4)) LIKE :CODE
GROUP BY VOUCHERTYPE,(SUBSTR(VOUCHERCODE,1,4))
whien i compile it does not give any error but when i run it it gives error such as-
REP-1401:'aprformula' :Fatal PL/SQL error occured
REP-0619:you cannot run without a layout.
Thanks
Dhinendra
|
|
|
Re: REP-1401 and rep-0619 [message #444649 is a reply to message #444619] |
Tue, 23 February 2010 03:54 |
cookiemonster
Messages: 13958 Registered: September 2008 Location: Rainy Manchester
|
Senior Member |
|
|
The formula query is invalid. You can't have a group by on a query that only returns a single row.
Are you sure you want a formula column rather than a summary column?
|
|
|
|