Pass parameters from form to report [message #411562] |
Sun, 05 July 2009 07:05 |
|
i am learning oracle let me tell my problem in oracle
i have made one simple form and one print button to display report in PDF format but when i am pressing print button it gives me wholee record but i want to print the same record which one i query for.i am poor in english i am sorry please any help
Sarah Aman
Eksaachadost@yahoo.com
[MERGED (again) by LF]
[Updated on: Tue, 07 July 2009 07:28] by Moderator Report message to a moderator
|
|
|
|
|
Display record in report [message #411616 is a reply to message #411562] |
Mon, 06 July 2009 01:43 |
|
can anyone help me?
how can we display a particular record in report?
1) we should use select query?
OR
2) we should use triggers?
can anyone guide me please.
i hope so i will get prompt answer.
thanks in advance
Sarah Aman
|
|
|
|
|
pass parameters form to report [message #411999 is a reply to message #411562] |
Tue, 07 July 2009 07:17 |
|
hi all,
how can we pass parameters form to report?
i am new in oracle!
i made one simple form with report and i made one print button
with trigger.(when-button-pressed) when i press the print button so its giving me whole data,i do not want whole information of the database i want to print particular record..
some one told me use query but i do not know where i place that query.
can anyone guide me how can we display the particular data in PDF format?
here is my print button code:
DECLARE
repid REPORT_OBJECT;
v_rep VARCHAR2(100);
rep_status VARCHAR2(20);
BEGIN
repid := FIND_REPORT_OBJECT('REPORT9');
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://sara:8889/reports/rwservlet/getjobid'||
substr(v_rep,instr(v_rep,'_',-1)+1)||'?'||'server=repserver','_blank');
ELSE
message('Error when running report');
END IF;
PAUSE;
END;
[Updated on: Tue, 07 July 2009 07:29] Report message to a moderator
|
|
|
|
Re: pass parameters form to report [message #412143 is a reply to message #412064] |
Tue, 07 July 2009 23:56 |
|
first of all
thanks for reply
its giving me error:
REP-52251: Cannot get output of job ID 81 you requested on Wed Jul 08 07:55:47 AST 2009.<P>REP-56033: Job 81 does not exist
can u guide me in proper way.
thanks in advance
|
|
|
Re: pass parameters form to report [message #412184 is a reply to message #412064] |
Wed, 08 July 2009 02:53 |
|
Dear sir
now my form is passing the parameter but by specify
value
by this: vParamValue number:=10;
i want to print those values which i execute from database
and when i press the print button, it print for me the same values which one i executed.
my new code is:
DECLARE
repid REPORT_OBJECT;
v_rep VARCHAR2(100);
rep_status VARCHAR2(20);
plid ParamList;
vParamValue number(10);
BEGIN
plid := Get_parameter_List('tmpdata');
IF NOT Id_Null(plid) THEN
Destroy_parameter_List( plid );
END IF;
plid := Create_parameter_List('tmpdata');
Add_parameter(plid,'P_deptno',TEXT_parameter,vParamValue);
Add_parameter(plid, 'PARAMFORM', TEXT_parameter, 'NO');
repid := FIND_REPORT_OBJECT('REPORT9');
v_rep := RUN_REPORT_OBJECT(repid,plid);
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://sara:8889/reports/rwservlet/getjobid'||
substr(v_rep,instr(v_rep,'_',-1)+1)||'?'||'server=repserver&P_deptno='||:deptno||'¶mform=no','_blank');
ELSE
message('Error when running report');
END IF;
PAUSE;
END;
sarah Aman
|
|
|
|
Re: pass parameters form to report [message #412254 is a reply to message #412234] |
Wed, 08 July 2009 06:40 |
|
dear sir
when i remove value from vparamvalue number :='10';(vparamvalue number;)
then it gives me blank report.
u asked for details its follow.
example:
we have so many data in database
1- deptno 10 2-loc new york
2- deptno 20 3-loc london
3- deptno 30 4-loc pakistan
etc etc
1- if i want to print only deptno 10 ,loc new york not with other data.
2- and now if i want to print only deptno 30,loc pakistan not with other data.
and in the report i want to display only those values which i executed in the form
i hope u got me. :
so what we will do for it?
sarah aman
[Updated on: Wed, 08 July 2009 07:01] Report message to a moderator
|
|
|
|
|
|
|
Re: pass parameters form to report [message #412309 is a reply to message #412302] |
Wed, 08 July 2009 11:04 |
|
thanks alot
i was using 10G v-10.1.2 before but cause of server failure i installed 10G v-9.0
i worked on the server to be started but i did not find any way to start the server
i used this command in cmd
rwserver server=server101 autostart=yes
but it did not work for me
if u know the way that how i can start the server so please share with me.
anyways thanks alot
|
|
|
|
Re: pass parameters form to report [message #412460 is a reply to message #412458] |
Thu, 09 July 2009 09:28 |
|
thanks for reply
i tried the same way but i did not start the server its showing me in the small box that you are server is ready but server is not starting in form 10G v-10.1.2.
but v-9.0.4 is working fine.
okay thanks alot for everything
Sarah Aman
|
|
|
|
|
|
Re: pass parameters form to report [message #413944 is a reply to message #412678] |
Sun, 19 July 2009 09:56 |
sazzadur
Messages: 9 Registered: January 2009 Location: UK
|
Junior Member |
|
|
Mr Sadat provided the following code:
DECLARE
vrepid report_object;
vrep VARCHAR2 (100);
v_format varchar2(12); -- PDF or SPREADSHEET
v_show_document VARCHAR2 (2000) := '/reports/rwservlet?';
v_connect VARCHAR2 (200) := 'userid=abc/abc@test.world';
v_report_server VARCHAR2 (30) := 'rep60server';
v_report_name varchar2(100);
BEGIN
v_report_name := 'EMP_REP';
v_format := 'PDF';
IF GET_APPLICATION_PROPERTY (user_interface) = 'WEB'
THEN
v_show_document := v_show_document
|| v_connect
-- Report server
|| '&server='
|| v_report_server
-- Report name
|| '&report='||v_report_name
-- Reports parameters
|| '&destype=CACHE'
|| '&desformat='||v_format
|| '¶mform=no'
|| '&p_deptno='||:deptno
|| '&p_loc='||:loc
;
web.show_document (v_show_document);
ELSE
vrepid := FIND_REPORT_OBJECT ('EMP_REP.rdf');
vrep := RUN_REPORT_OBJECT (vrepid);
web.show_document
( 'it-saadat:8889/reports/rwservlet/getjobid'
|| SUBSTR (vrep, INSTR (vrep, '_', -1) + 1)
|| '?'
|| 'server=rep60server',
'_blank'
);
END IF;
END;
So, Sarah Aman, where did you use
add_parameter(plid,'P_empno',text_parameter,to_char(:emp.empno)) ??
|
|
|
|
|