bsippy
asked on
Integrating Oracle Reports with Oracle Forms 10g Menus
I just migrated from oracle developer 6.0 to oracle developer 10g....I have to call reports through Menus...in 6.0 I used the following code
Declare
pl_id paramlist;
Begin
if :global.hlr is null then
message('Cannot run report - No Hotline Record');
raise form_trigger_failure;
end if;
pl_id := Get_Parameter_List('p_list ');
if not Id_Null(pl_id) then
Destroy_Parameter_List(pl_ id);
end if;
pl_id := create_parameter_list('p_l ist');
add_parameter(pl_id,'hlr_n um',text_p arameter,: global.hlr );
run_product(reports,'hotli ne',synchr onous,runt ime,filesy stem,pl_id ,'null');
End;
in 10 g I changed the "run_product" as follows
Web.show_document ('/reports/rwservlet=Repsr v&report=C :\myApp\rp t.rdf&desf ormat=pdf& destype=ca che&userid =user/pass word@orcl& paramform= yes&HLR_NU M=3171,'_b lank');
for test purpose and the report came out blank...can some one please direct me on how to pass parameters.
Thank You
Declare
pl_id paramlist;
Begin
if :global.hlr is null then
message('Cannot run report - No Hotline Record');
raise form_trigger_failure;
end if;
pl_id := Get_Parameter_List('p_list
if not Id_Null(pl_id) then
Destroy_Parameter_List(pl_
end if;
pl_id := create_parameter_list('p_l
add_parameter(pl_id,'hlr_n
run_product(reports,'hotli
End;
in 10 g I changed the "run_product" as follows
Web.show_document ('/reports/rwservlet=Repsr
for test purpose and the report came out blank...can some one please direct me on how to pass parameters.
Thank You
Oh sorry, I have missed parameters, here it is:
Declare
pl_id ParamList;
pl_name VARCHAR2(10):='tempdata';
BEGIN
pl_id := Get_Parameter_List(pl_name );
IF NOT Id_Null(pl_id) THEN
Destroy_Parameter_List( pl_id );
END IF;
pl_id := Create_Parameter_List(pl_n ame);
... adding parameters
... setting report object properties
-- here it is:
report_job_id := RUN_REPORT_OBJECT(report_i d,pl_id);
report_job_id := RUN_REPORT_OBJECT(report_i d);
rep_status:=REPORT_OBJECT_ STATUS(rep ort_job_id );
WHILE rep_status in ('RUNNING','OPENING_REPORT ','ENQUEUE D')
LOOP
rep_status:=run_report_obj ect(report _id);
END LOOP;
IF rep_status='FINISHED' THEN
-- this shows report
WEB.SHOW_DOCUMENT(L_REPORT _SERVER_PA TH||'/rwse rvlet/getj obid'||sub str(report _job_id,in str(report _job_id,'_ ',-1)+1)|| '?'||'serv er='||L_RE PORT_SERVE R,'_blank' );
ELSE
message('Error');
END IF;
END;
Declare
pl_id ParamList;
pl_name VARCHAR2(10):='tempdata';
BEGIN
pl_id := Get_Parameter_List(pl_name
IF NOT Id_Null(pl_id) THEN
Destroy_Parameter_List( pl_id );
END IF;
pl_id := Create_Parameter_List(pl_n
... adding parameters
... setting report object properties
-- here it is:
report_job_id := RUN_REPORT_OBJECT(report_i
report_job_id := RUN_REPORT_OBJECT(report_i
rep_status:=REPORT_OBJECT_
WHILE rep_status in ('RUNNING','OPENING_REPORT
LOOP
rep_status:=run_report_obj
END LOOP;
IF rep_status='FINISHED' THEN
-- this shows report
WEB.SHOW_DOCUMENT(L_REPORT
ELSE
message('Error');
END IF;
END;
ASKER
Thank You for the response.
I am calling my report from a Menu so how do I get the find_report_object()
Really appreciate ur response
I am calling my report from a Menu so how do I get the find_report_object()
Really appreciate ur response
ASKER
I am getting the error
FRM-41213:Unable to connect to the Report server Repsrv@sec12-pc.
How can I proceed from here...I have my Repsrv server started and also the OC4J Instance.
Thank You.
FRM-41213:Unable to connect to the Report server Repsrv@sec12-pc.
How can I proceed from here...I have my Repsrv server started and also the OC4J Instance.
Thank You.
ASKER
My Reports Server is Repsrv@sec12-pc
You can create an user defined trigger in a Form and call this trigger from a Menu (by using EXECUTE_TRIGGER built-in).
In my code:
L_REPORT_SERVER - it is the name of the report server - Repsrv@sec12-pc
L_REPORT_SERVER_PATH - e.g. http://sba.jss.sk:7779
or if you want to run the report from Form Developer it is something similar to http://the_name of yourpc:8888/reports'
In my code:
L_REPORT_SERVER - it is the name of the report server - Repsrv@sec12-pc
L_REPORT_SERVER_PATH - e.g. http://sba.jss.sk:7779
or if you want to run the report from Form Developer it is something similar to http://the_name of yourpc:8888/reports'
I am calling my report from a Menu so how do I get the find_report_object() - you can create a dummy report in the Form (node Reports)
report_id:= FIND_REPORT_OBJECT(dummy_r eport);
SET_REPORT_OBJECT_PROPERTY (report_id ,REPORT_FI LENAME,L_R EPORT); -- L_REPORT is the name of the real report
report_id:= FIND_REPORT_OBJECT(dummy_r
SET_REPORT_OBJECT_PROPERTY
ASKER
How can I solve he following error
FRM-41213:Unable to connect to the Report server Repsrv@sec12-pc.
Thnx in advance
FRM-41213:Unable to connect to the Report server Repsrv@sec12-pc.
Thnx in advance
... Ensure that Reports Server being referenced in the RUN_REPORT_OBJECT code is started. Note, the in-process Report Server may not be started if no reports requests have been run prior to calling a report from the forms application. It is necessary to first invoke the rwservlet for the in-process server to be started ...
ASKER
The Report Server is started.
The code I have used is as below
Declare
pl_id paramlist;
pl_name VARCHAR2(10):='tempdata';
report_id REPORT_OBJECT;
ReportServerJob VARCHAR2(100);
rep_status VARCHAR2(200);
L_REPORT_SERVER VARCHAR2(30):='Repsrv@sec1 2-pc';
L_REPORT_SERVER_PATH VARCHAR2(30);
L_REPORT_DESFORMAT VARCHAR2(15):='pdf';
report_job_id VARCHAR2(200);
Begin
if :global.plr is null then
message('Cannot run report');
raise form_trigger_failure;
end if;
pl_id := Get_Parameter_List('p_list ');
if not Id_Null(pl_id) then
Destroy_Parameter_List(pl_ id);
end if;
pl_id := create_parameter_list('p_l ist');
add_parameter(pl_id,'hlr_n um',text_p arameter,: global.plr );
report_id := find_report_object('TEST') ;
SET_REPORT_OBJECT_PROPERTY (report_id ,REPORT_OT HER,'TEST. PLR='||:gl obal.hlr|| 'paramform =no');
SET_REPORT_OBJECT_PROPERTY (report_id ,REPORT_FI LENAME,'C: \test.rdf' );
SET_REPORT_OBJECT_PROPERTY (report_id ,REPORT_CO MM_MODE,SY NCHRONOUS) ;
SET_REPORT_OBJECT_PROPERTY (report_id ,REPORT_EX ECUTION_MO DE,BATCH);
SET_REPORT_OBJECT_PROPERTY (report_id ,REPORT_DE STYPE,FILE );
SET_REPORT_OBJECT_PROPERTY (report_id ,REPORT_DE SFORMAT,L_ REPORT_DES FORMAT);
SET_REPORT_OBJECT_PROPERTY (report_id ,REPORT_SE RVER,L_REP ORT_SERVER );
report_job_id := RUN_REPORT_OBJECT(report_i d,pl_id);
-- report_job_id := RUN_REPORT_OBJECT(report_i d);
rep_status:= REPORT_OBJECT_STATUS(repor t_job_id);
WHILE rep_status in ('RUNNING','OPENING_REPORT ','ENQUEUE D')
LOOP
rep_status := run_report_object(report_i d);
END LOOP;
IF rep_status='FINISHED' THEN
WEB.SHOW_DOCUMENT(L_REPORT _SERVER_PA TH||'/repo rts/rwserv let/getjob id'||subst r(report_j ob_id,inst r(report_j ob_id,'_'- 1)+1)||'?' ||'server= '||L_REPOR T_SERVER,' _blank');
ELSE
MESSAGE('Error');
END IF;
End;
but when i run my form and try running the report i get the error
frm-41213: Unable to connect to report server Repsrv@sec12-pc
this is VERY URGENT pls help.
Thanx in advance.
The code I have used is as below
Declare
pl_id paramlist;
pl_name VARCHAR2(10):='tempdata';
report_id REPORT_OBJECT;
ReportServerJob VARCHAR2(100);
rep_status VARCHAR2(200);
L_REPORT_SERVER VARCHAR2(30):='Repsrv@sec1
L_REPORT_SERVER_PATH VARCHAR2(30);
L_REPORT_DESFORMAT VARCHAR2(15):='pdf';
report_job_id VARCHAR2(200);
Begin
if :global.plr is null then
message('Cannot run report');
raise form_trigger_failure;
end if;
pl_id := Get_Parameter_List('p_list
if not Id_Null(pl_id) then
Destroy_Parameter_List(pl_
end if;
pl_id := create_parameter_list('p_l
add_parameter(pl_id,'hlr_n
report_id := find_report_object('TEST')
SET_REPORT_OBJECT_PROPERTY
SET_REPORT_OBJECT_PROPERTY
SET_REPORT_OBJECT_PROPERTY
SET_REPORT_OBJECT_PROPERTY
SET_REPORT_OBJECT_PROPERTY
SET_REPORT_OBJECT_PROPERTY
SET_REPORT_OBJECT_PROPERTY
report_job_id := RUN_REPORT_OBJECT(report_i
-- report_job_id := RUN_REPORT_OBJECT(report_i
rep_status:= REPORT_OBJECT_STATUS(repor
WHILE rep_status in ('RUNNING','OPENING_REPORT
LOOP
rep_status := run_report_object(report_i
END LOOP;
IF rep_status='FINISHED' THEN
WEB.SHOW_DOCUMENT(L_REPORT
ELSE
MESSAGE('Error');
END IF;
End;
but when i run my form and try running the report i get the error
frm-41213: Unable to connect to report server Repsrv@sec12-pc
this is VERY URGENT pls help.
Thanx in advance.
ASKER
Oops I didn't set L_REPORT_SERVER_PATH...as I set it..there is no error but the report isn't opening up....any ideas
Thanx in advance
Thanx in advance
I think that the problem can be caused by L_REPORT_DESFORMAT VARCHAR2(15):='pdf';
Please, try it with
L_REPORT_DESFORMAT VARCHAR2(15):='HTML';
Please, try it with
L_REPORT_DESFORMAT VARCHAR2(15):='HTML';
ASKER
It is still giving me the FRM-41213 error......is there any configuration setting I am missing?
Can the report be run from a simple form ? or from Developer (not iAS) ?
On this site (free registration) - http://www.oracle.com/technology/products/forms/techlisting10g.html - you can read Integration part ...
On this site (free registration) - http://www.oracle.com/technology/products/forms/techlisting10g.html - you can read Integration part ...
ASKER
I can run the report directly from the browser
http://<server>:<port>/reports/rw servlet?re port=<repo rt>&.... <other parameters>
http://<server>:<port>/reports/rw
I am rather confused by your answer:
"Oops I didn't set L_REPORT_SERVER_PATH...as I set it..there is no error but the report isn't opening up....any ideas"
So if it has been 'pdf' there is no error but it is blank.
You can try this:
1) in regedit: rwserver -install repserver90 autostart=yes (repserver90 or another is file repserver90.dat located in <<oracle_home>>\reports\se rver\)
2) start OC4J
3) run report from Forms
"Oops I didn't set L_REPORT_SERVER_PATH...as I set it..there is no error but the report isn't opening up....any ideas"
So if it has been 'pdf' there is no error but it is blank.
You can try this:
1) in regedit: rwserver -install repserver90 autostart=yes (repserver90 or another is file repserver90.dat located in <<oracle_home>>\reports\se
2) start OC4J
3) run report from Forms
ASKER
Hi,
Thank you...but I keep on getting the error FRM-41213:Unable to connect to the Report server Repsrv@sec12-pc...so I used
Web.show_document('/report s/rwservle t?server=R epsrv@sec1 2-pc&repor t=C:/myApp /test.rdf& desformat= pdf&destyp e=CACHE&us erid=user/ pwd@databa se¶mfo rm=no&tlr_ num=3171', '_blank');
This worked but the draw back is the username and pwd is visible on the address.
Thank you...but I keep on getting the error FRM-41213:Unable to connect to the Report server Repsrv@sec12-pc...so I used
Web.show_document('/report
This worked but the draw back is the username and pwd is visible on the address.
Maybe there is problem with authentication there.
You can try this solution from MetaLink:
The sqlnet.ora files contain the following declaration: SQLNET.AUTHENTICATION_SERV ICES=(NTS) in both Database ORACLE_HOME/network/admin And 9iAS ORACLE_HOME/network/admin
Workaround:
Comment out the SQLNET.AUTHENTICATION_SERV ICES declaration in both sqlnet.ora files. Stop the database, database listnener and http listener and restart them.
You can try this solution from MetaLink:
The sqlnet.ora files contain the following declaration: SQLNET.AUTHENTICATION_SERV
Workaround:
Comment out the SQLNET.AUTHENTICATION_SERV
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
Thank you,
I will give it a try
I will give it a try
declare
report_id Report_Object;
ReportServerJob VARCHAR2(100);
rep_status VARCHAR2(200);
L_REPORT_SERVER VARCHAR2(15) :=:agenti.nume;
L_REPORT_SERVER_PATH VARCHAR2(30); -- if you want to run report in a development environment e.g. 'http://yourpc:8888/reports';
L_REPORT_DESFORMAT VARCHAR2(15):='HTML';
rep_status VARCHAR2(200);
report_job_id VARCHAR2(200);
BEGIN
report_id:= find_report_object('REPORT
SET_REPORT_OBJECT_PROPERTY
SET_REPORT_OBJECT_PROPERTY
SET_REPORT_OBJECT_PROPERTY
SET_REPORT_OBJECT_PROPERTY
SET_REPORT_OBJECT_PROPERTY
SET_REPORT_OBJECT_PROPERTY
SET_REPORT_OBJECT_PROPERTY
report_job_id := RUN_REPORT_OBJECT(report_i
rep_status:=REPORT_OBJECT_
WHILE rep_status in ('RUNNING','OPENING_REPORT
LOOP
rep_status:=run_report_obj
END LOOP;
IF rep_status='FINISHED' THEN
-- this shows report
WEB.SHOW_DOCUMENT(L_REPORT
ELSE
message('Error');
END IF;
END;