How to use nvl in Reports 10g
LuKKaJan 20 2010 — edited Jan 20 2010Dear All
I am using Reports 10g.
In forms i have a search condition . I have 3 items like Empno, Dept and date .
My reports based on a view .
So in forms if i will give all the info then it should return all the vale based on that OR if i will give only dept then it should return based on dept . I mean i can give all or one or two or nothing values in my search text items .
So In reports i have to use BIND varible .
So how can i write .
I have written like this :This is my actually code .
SELECT *
FROM vu_reports
WHERE
nvl(usrid,0) = nvl(:p_userid,nvl(usrid,0))
and nvl(block,'x') =nvl(:p_block,nvl(block,'x'))
and nvl(floor,'x')=nvl(:p_floor,nvl(floor,'x'))
and nvl(dept,'x')=nvl(:p_dept,nvl(dept,'x'))
and nvl(room,'x')=nvl(:p_room,nvl(room,'x'))
and nvl(category_name,'x')=nvl(:p_category,nvl(category_name,'x'))
and nvl(ip_address,'x')=nvl(:p_ip,nvl(ip_address,'x'))
If i write one error is coming that is :- ORA-24333: zero iteration count
How to solve it ?
or is there any other way is availabe ?