Restrict the where clause
in order to remove the where clause in a report as "where deptno = :P_1" use a lexical parameter that will be nullified in cas of a global extraction.
Remove a lexical part of a SQL order
Create a user parameter X with the initial value as: where deptno = :P_1, the type will be VARCHAR2 or CHAR and this parameter won't be displayed in the parameter form.
In the AFTER PARAMETER FORM trigger or the BEFORE REPORT trigger check the value of DEPTNO entered in the parameter form.
In the cas :DEPTNO=0
assign null to the parameter X as :X := NULL;
In the other cases
do nothing
the query will be written this way:
select * from EMP &X
&X is a lexical reference to the prameter X
&X will be substitued by where deptno = :P_1.
Good luck, bye Rayd
[Edited by rbouissou on 04-19-2001 at 02:16 PM]