Home » Developer & Programmer » Reports & Discoverer » REP-1401 and rep-0619
REP-1401 and rep-0619 [message #444619] Tue, 23 February 2010 01:38 Go to next message
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 Go to previous messageGo to next message
cookiemonster
Messages: 12321
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?
Re: REP-1401 and rep-0619 [message #444654 is a reply to message #444619] Tue, 23 February 2010 05:00 Go to previous message
dhinendra
Messages: 58
Registered: September 2009
Location: Gurgaon,India
Member
hi cookiemonster
i got it thanks buddy... Smile



Dhinendra
Previous Topic: Problem with Temporary table
Next Topic: how to use union
Goto Forum:
  


Current Time: Sat Oct 01 12:39:28 CDT 2016

Total time taken to generate the page: 0.06757 seconds