Home » Developer & Programmer » Reports & Discoverer » REP-1401
REP-1401 [message #185634] Wed, 02 August 2006 15:26 Go to next message
sweetgeegee27
Messages: 107
Registered: June 2005
Senior Member
function CF_OWNER_NAMEFormula return Char is
  V_OWNER_NAME            VARCHAR2(60); 
  V_PROPERTY_NO           PROPERTY.PROPERTY_NO%TYPE;                 

  cursor c_property (B_TAX_PAYER_NO IN NUMBER) is
	  SELECT P.PROPERTY_NO
	  FROM   PROP_OWNER     PO,
	         PROP_OWNERSHIP POS,
	         PROPERTY       P
	  WHERE  PO.TAX_PAYER_NO  = B_TAX_PAYER_NO
	  AND    POS.TAX_PAYER_NO = PO.TAX_PAYER_NO
	  AND    P.PROPERTY_NO    = POS.PROPERTY_NO
      and    (SYSDATE BETWEEN     POS.START_DATE AND POS.END_DATE
      or     (SYSDATE >= POS.START_DATE AND POS.END_DATE IS NULL))
      AND    FL_VOID = 'N';  
      
  CURSOR C_OWNER_NAME IS
    SELECT GET_NAME_FN(:TP_MAIL)
    FROM DUAL;              
                             

BEGIN
   OPEN C_OWNER_NAME;
   FETCH C_OWNER_NAME 
   INTO  V_OWNER_NAME;
   CLOSE C_OWNER_NAME;  

   OPEN C_PROPERTY(:TAX_PAYER_NO);
   FETCH C_PROPERTY
   INTO  V_PROPERTY_NO;
   CLOSE C_PROPERTY;
     
  DETERMINE_ADDRESS(:TP_MAIL, V_PROPERTY_NO,:TAX_TYPE_NO,  TO_NUMBER(''), :P_TAX_PAYER_NAME, 
                    :P_REP_NAME, :P_MAILING_ADDRESS,:P_CITY_NAME,:P_POST_CODE_DESC, :P_COUNTRY_NAME,
                    :p_parish_name); 

	RETURN (V_OWNER_NAME);
	
exception
	when no_data_found then
	  return(null);
end;                                
  

                                                      

Can anyone tell me what's wrong with this code. I will be happy to submit any additional information needed.
Re: REP-1401 [message #185679 is a reply to message #185634] Thu, 03 August 2006 01:26 Go to previous message
Littlefoot
Messages: 21823
Registered: June 2005
Location: Croatia, Europe
Senior Member
Account Moderator
Don't cross-post; although this is the right Forum for such a question, what does it do in SQL & PL/SQL Newbies one?
Previous Topic: Replace null with Zero in Matrix report
Next Topic: how system give me page selection windows
Goto Forum:
  


Current Time: Fri Nov 29 23:52:23 CST 2024