Need Help in passing report parameter from form9i [message #301780] |
Thu, 21 February 2008 12:59 |
janaq
Messages: 22 Registered: August 2007
|
Junior Member |
|
|
Hi Everyone,
I need your urgent help. I am new to reports 9i and have no idea about how to pass report parameter from form 9i. can any one help me with this. i have run this code to run a simple report with out parameter.
DECLARE
repid REPORT_OBJECT;
v_rep VARCHAR2(100);
rep_status VARCHAR2(20);
BEGIN
repid := FIND_REPORT_OBJECT('REPORT6');
v_rep := RUN_REPORT_OBJECT(repid);
rep_status := REPORT_OBJECT_STATUS(v_rep);
WHILE rep_status in ('RUNNING','OPENING_REPORT','ENQUEUED')
LOOP
rep_status := report_object_status(v_rep);
END LOOP;
IF rep_status = 'FINISHED' THEN
/*Display report in the browser*/
WEB.SHOW_DOCUMENT('http://home-afrufgiel1:8888/reports/rwservlet/
getjobid'||substr(v_rep,instr(v_rep,'_',-1)+1)||'?'||'server=rep90','_blank');
ELSE
message('Error when running report');
END IF;
PAUSE;
END;
I have a report with parameters named as Inputdate (database field) between :Start Date and :End Date .
Now i have a form with a button as run report without any text field on the form. i want that when a user clicks the run report button the system ask for start and end date and match tht date with the data base and displays the record.
Can any one please tell me the code how i can do this.
thanks in advance.
|
|
|
|