Home » Developer & Programmer » Forms » rep-300: missing right parenthesis (10.1.2.0.2,windows 2003)
rep-300: missing right parenthesis [message #400733] Wed, 29 April 2009 07:00 Go to next message
nasir_mughal
Messages: 122
Registered: April 2007
Location: Karachi
Senior Member
Hi

I encounter "rep-300: Missing right parenthesis" error when i try to run my report. Report is based on this query

SELECT a.branch_id, 
       a.YEAR, 
       a.srno, 
       a.branch_id 
       ||'-' 
       ||a.YEAR 
       ||'-' 
       ||a.srno   leas_acc, 
       a.REF, 
       a.insp_id, 
       b.NAME, 
       b.home_phone1 
       ||'.' 
       ||b.home_phone2 h_phone, 
       b.mobile, 
       b.area, 
       b.city, 
       a.trans_date, 
       a.inst, 
       Decode(Sign((a.inst * Trunc(Months_between(SYSDATE,a.trans_date)) + a.down_payment) - (Nvl(a.leasing,0) + Nvl(a.late_fee,0))),1,Nvl(a.leasing,0) + Nvl(a.late_fee,0) - Nvl(c.recv_amt,0), 
                                                                                                                                     a.inst * Trunc(Months_between(SYSDATE,a.trans_date)) + a.down_payment - Nvl(c.recv_amt,0)) dues, 
       Decode(Sign((a.inst * Trunc(Months_between(SYSDATE,a.trans_date)) + a.down_payment) - (Nvl(a.leasing,0) + Nvl(a.late_fee,0))),1,Nvl(a.leasing,0) + Nvl(a.late_fee,0) - Nvl(c.recv_amt,0), 
                                                                                                                                     (a.inst * Trunc(Months_between(SYSDATE,a.trans_date)) + a.down_payment - Nvl(c.recv_amt,0)) / a.inst) n_inst, 
       c.recv_amt, 
       Decode(c.last_recv,NULL,a.trans_date, 
                          last_recv) last_recv, 
       Trunc(SYSDATE - Decode(c.last_recv,NULL,a.trans_date, 
                                          c.last_recv), 
             0) late_days, 
       d.prom_date 
FROM   leas_acc a, 
       address_book b, 
       (SELECT   lea_year, 
                 acc_branch, 
                 lea_acc, 
                 Sum(amount)     recv_amt, 
                 Max(trans_date) last_recv 
        FROM     inst_trans 
        GROUP BY lea_year, 
                 acc_branch, 
                 lea_acc) c, 
       (SELECT   lea_year, 
                 acc_branch, 
                 lea_acc, 
                 Max(prom_date) prom_date 
        FROM     acc_diary 
        GROUP BY lea_year, 
                 acc_branch, 
                 lea_acc) d 
WHERE  a.YEAR = b.YEAR (+) 
       AND a.branch_id = b.branch_id (+) 
       AND a.srno = b.srno (+) 
       AND b.person_id = 0 
       AND a.status NOT IN ('S','C','D') 
       AND a.branch_id = :BRANCH 
       AND a.YEAR = c.lea_year (+) 
       AND a.branch_id = c.acc_branch (+) 
       AND a.srno = c.lea_acc (+) 
       AND a.YEAR = d.lea_year (+) 
       AND a.branch_id = d.acc_branch (+) 
       AND a.srno = d.lea_acc (+) &cond



following code is written on "When-Button-Pressed" to call report

Declare
	P_INST VARCHAR2(300);
	P_COND VARCHAR2(1500);
	
BEGIN
	
	P_INST:=' AND ROUND(DECODE(SIGN((A.INST*TRUNC(MONTHS_BETWEEN(SYSDATE,A.TRANS_DATE))+A.DOWN_PAYMENT)-(NVL(A.LEASING,0)+NVL(A.LATE_FEE,0))),1,
NVL(A.LEASING,0)+NVL(A.LATE_FEE,0)-NVL(C.RECV_AMT,0),(A.INST*TRUNC(MONTHS_BETWEEN(SYSDATE,A.TRANS_DATE))+A.DOWN_PAYMENT-NVL(C.RECV_AMT,0))/A.INST),'||''''||'999'||''''||')>'||5;
	
	P_COND:=P_INST;

	WEB.show_document('/reports/rwservlet?server='||:PARAMETER.reps
																							  ||'&ssoconn=default/oracledb/userid'
                                              	||'&report=acc_due_list2.rep'
                                              	||'&desformat=PDF'
                                              	||'&destype=CACHE'
                                              	||'&branch='||:PARAMETER.branch_id
                                              	||'&cond='||p_cond
																			        	||'&paramform=no'
																			        ,'_blank');
END;





Kindly help me.

Thanks
Re: rep-300: missing right parenthesis [message #400741 is a reply to message #400733] Wed, 29 April 2009 07:10 Go to previous messageGo to next message
Littlefoot
Messages: 21818
Registered: June 2005
Location: Croatia, Europe
Senior Member
Account Moderator
Query seems to be OK; my formatter didn't find any "missing parenthesis". Though, maybe Reports doesn't like inline views - try to move "c" and "d" into the database (create "real" views).

Also, is there any other query or formula column or similar which might produce the error? Perhaps parameter's list of values query or ... something.
Re: rep-300: missing right parenthesis [message #401887 is a reply to message #400741] Wed, 06 May 2009 18:54 Go to previous message
djmartin
Messages: 10181
Registered: March 2005
Location: Surges Bay TAS Australia
Senior Member
Account Moderator
Have you solved your problem?

David
Previous Topic: mouse style
Next Topic: call report
Goto Forum:
  


Current Time: Fri Sep 20 10:49:30 CDT 2024