Home » Developer & Programmer » Reports & Discoverer » Being unable to run a report
Being unable to run a report [message #567331] Wed, 26 September 2012 12:10 Go to next message
edzkyz19
Messages: 1
Registered: September 2012
Location: Philippines
Junior Member

Hi, please help me tune my query below, because every time user run the report they have got an error like unable to run report. Thank you.

select b.branchdesc ,
c.description ,
d.groupgldesc ,
a.loanno,f.agreementno,
e.customername ,
(sum(a.dramt) - sum(a.cramt) ) diffamt ,
a.groupglid
from final_voucher_breakup_dtl a ,
nbfc_branch_m b ,
NBFC_product_m c ,
fa_groupgl_m d,
nbfc_customer_m e,
lea_agreement_dtl f ,
nbfc_voucher_hdr i

where
a.branchid = b.branchid and
a.groupglid = d.groupglid and
a.loanno = f.agreementid and
f.productflag = c.code and
f.lesseeid = e.customerid and
a.branchid = NVL(:p_branchid,a.BRANCHID) and
a.groupglid = nvl(:p_groupglid,a.GROUPGLID) and
f.productflag = nvl(:P_PRODUCTID,f.productflag) and
f.schemeid = nvl(:p_schemeid,f.schemeid) and
nvl(f.promotionid,0) = nvl(nvl(:p_promotionid, f.promotionid ),0) and
a.voucherdate >= Nvl(to_date(:p_fromvoudate),a.VOUCHERDATE) and
a.voucherdate <= Nvl(to_date(:p_tovoudate),a.VOUCHERDATE) and
a.loanno = Nvl(:p_agreementid,a.loanno) and
a.moduleid='LEA'
and f.status in ('A','C') AND
a.branchid = i. branchid and
a.voucherid = i.voucherid
&P_GAAPID
group by
b.branchdesc ,
c.description ,
d.groupgldesc ,
a.loanno,f.agreementno,
e.customername ,
a.groupglid,
I.VOUCHERID,
B.BRANCHID

order by
b.branchdesc ,
c.description ,
d.groupgldesc;
Re: Being unable to run a report [message #567452 is a reply to message #567331] Mon, 01 October 2012 06:58 Go to previous messageGo to next message
cookiemonster
Messages: 13917
Registered: September 2008
Location: Rainy Manchester
Senior Member
Welcome to the forum.
Please read and follow How to use [code] tags and make your code easier to read?

An unable to run report error does not suggest to me that the query needs tuning.
It suggests there is a bug in the code.
What is the exact error message?
Re: Being unable to run a report [message #567455 is a reply to message #567452] Mon, 01 October 2012 07:24 Go to previous messageGo to next message
Littlefoot
Messages: 21806
Registered: June 2005
Location: Croatia, Europe
Senior Member
Account Moderator
Does that query return any result when you run it from SQL*Plus?
Re: Being unable to run a report [message #567456 is a reply to message #567455] Mon, 01 October 2012 07:44 Go to previous messageGo to next message
cookiemonster
Messages: 13917
Registered: September 2008
Location: Rainy Manchester
Senior Member
It won't run as it stands because of the lexical parameter. I wouldn't be at all suprised if the lexical parameter is the cause of the problem.
Re: Being unable to run a report [message #567457 is a reply to message #567456] Mon, 01 October 2012 07:48 Go to previous message
Littlefoot
Messages: 21806
Registered: June 2005
Location: Croatia, Europe
Senior Member
Account Moderator
Of course it will not run as it is; lexical parameter should be replaced with its exact value (probably based on input parameters).

I agree - lexical parameter might be the cause.
Previous Topic: Recover from Hour Glass Symbol
Next Topic: Digits Conversion
Goto Forum:
  


Current Time: Fri Mar 29 10:32:21 CDT 2024