Home » Developer & Programmer » Forms » To get Range of details from blank to a Selected value in Parameter form
To get Range of details from blank to a Selected value in Parameter form [message #83879] Wed, 24 December 2003 05:04 Go to next message
Rahul Desai
Messages: 26
Registered: March 2002
Junior Member
Dear friends,
I would like to know how to get values from blank value to a selected value in parameter form.

for instance,
I have EMPNo FROM and EMPNo TO in the parameter screen where it shows the list of EMPNo in the company and the Empno are populated from the table. If the user selects no value in EMPNo FROM and a value in EMPNo TO then the report should populated all the details starting from the first EMPNo till the EMPNo TO he selects.

looking for solution
thanks in advance.

Rahul
Re: To get Range of details from blank to a Selected value in Parameter form [message #83881 is a reply to message #83879] Wed, 24 December 2003 19:36 Go to previous message
sameer_am2002
Messages: 129
Registered: September 2002
Senior Member
Try this code.
declare
pl_id paramlist := Get_Parameter_List('tmpdata');
begin
IF NOT Id_Null(pl_id) THEN
Destroy_Parameter_List( pl_id );
END IF;
pl_id := Create_Parameter_List('tmpdata');
Add_Parameter(pl_id, 'p_fromempno', TEXT_PARAMETER, :fromemp);
Add_Parameter(pl_id, 'p_toempno', TEXT_PARAMETER, :toempno);
Run_Product(REPORTS, 'test', SYNCHRONOUS, RUNTIME,FILESYSTEM, pl_id, NULL);
END;

Then in the report your query should look like this.
SELECT ALL EMP.EMPNO,
EMP.ENAME, EMP.JOB, EMP.MGR, EMP.HIREDATE, EMP.SAL, EMP.COMM
FROM EMP where empno >= nvl(:p_fromempno , empno) and empno <= nvl(:toempno, empno) order by empno. So even if the user doesnt select any range he can see full data.
Previous Topic: How to use Flash .SWF file in Form ( Plz its Urgent)
Next Topic: forms 3 --> forms 6
Goto Forum:
  


Current Time: Thu Mar 28 23:58:15 CDT 2024