Calling reports from forms10G [message #439953] |
Wed, 20 January 2010 05:43 |
esraa90
Messages: 63 Registered: May 2008 Location: EGYPT
|
Member |
|
|
I have the following code to run my report form my application form:
DECLARE
repid REPORT_OBJECT;
v_rep VARCHAR2(100);
rep_status varchar2(20);
BEGIN
repid := find_report_object('TEST');
v_rep := RUN_REPORT_OBJECT(repid);
END;
But, when button pressed I got the following error:
FRM-41211 Integration error SSL Failure running another product
I don't know where is the problem.
Kould any one help ??
|
|
|
Re: Calling reports from forms10G [message #440413 is a reply to message #439953] |
Sun, 24 January 2010 00:42 |
tamzidulamin
Messages: 132 Registered: October 2009 Location: Dhaka
|
Senior Member |
|
|
To call a report in Developer10g, u have
to use web.show_document built-ins.
u must ensure that:
01.install report server
02.configure report server
then call a report with web.show_document.
Regard's
Tamzidul Amin
|
|
|
|
|
Re: Calling reports from forms10G [message #440546 is a reply to message #439953] |
Mon, 25 January 2010 09:03 |
Kevin58
Messages: 79 Registered: January 2009
|
Member |
|
|
Not sure if this will answer your question.
This is what I use to run my reports:
PROCEDURE GENERATE_AGG_LABEL(report_name varchar2,
out_format varchar2) IS
v_plist_id PARAMLIST;
repid REPORT_OBJECT;
v_rep VARCHAR2(100);
ALERT_BUTTON NUMBER;
rep_status VARCHAR2(50);
rpt_format VARCHAR2(20);
app_server VARCHAR2(80) := GET_APP_SERVER;
app_svr_port VARCHAR2(80) := GET_SVR_PORT;
rpt_server VARCHAR2(80) := GET_RPT_SERVER;
BEGIN
--Temporary override of report server name
--rpt_server := 'HWY10613';
--app_server := 'HWY10613.dot.int.lan';
--app_svr_port := ':8889';
--MESSAGE('App Server name: ' || app_server);
--MESSAGE('Rpt Server name: ' || rpt_server);
--MESSAGE(' ');
--ALERT_BUTTON := SHOW_ALERT('REPORT_TYPE');
--CASE ALERT_BUTTON
--WHEN (ALERT_BUTTON1) THEN rpt_format := 'PDF';
--WHEN (ALERT_BUTTON2) THEN rpt_format := 'SPREADSHEET';
--WHEN (ALERT_BUTTON3) THEN rpt_format := 'HTML';
--END CASE;
rpt_format := 'PDF';
-- Override database settings for testing!
--app_server := 'ntiast.dot.int.lan';
--app_svr_port := ':7778';
--rpt_server := 'rep_Ntiast_midtier10gr2';
--message('Report name: ' || report_name);
--repid := find_report_object('MATLS_REPORT');
repid := find_report_object(report_name);
--message(' ');
SET_REPORT_OBJECT_PROPERTY(repid,REPORT_DESFORMAT, rpt_format);
SET_REPORT_OBJECT_PROPERTY(repid,REPORT_EXECUTION_MODE,BATCH);
SET_REPORT_OBJECT_PROPERTY(repid,REPORT_COMM_MODE,SYNCHRONOUS);
SET_REPORT_OBJECT_PROPERTY(repid,REPORT_DESTYPE,CACHE);
SET_REPORT_OBJECT_PROPERTY(repid,REPORT_OTHER,'OUTPUTIMAGEFORMAT=gif');
v_plist_id := GET_PARAMETER_LIST('SAMPLE_ID');
IF NOT ID_NULL(v_plist_id) THEN
DESTROY_PARAMETER_LIST('SAMPLE_ID');
END IF;
v_plist_id := CREATE_PARAMETER_LIST('SAMPLE_ID');
ADD_PARAMETER(v_plist_id,'P_SAMPLE_KEY',TEXT_PARAMETER, :agg_samples_pg.sample_key );
ADD_PARAMETER(v_plist_id,'P_LAB_ID',TEXT_PARAMETER, :agg_samples_pg.lab_id );
SET_REPORT_OBJECT_PROPERTY(repid,REPORT_SERVER, rpt_server);
-- Run the report!
v_rep := RUN_REPORT_OBJECT(repid, v_plist_id);
DECLARE
errnum NUMBER := ERROR_CODE;
errtxt VARCHAR2(80) := ERROR_TEXT;
errtyp VARCHAR2(3) := ERROR_TYPE;
BEGIN
IF Form_Failure THEN
Message('ERROR TYPE : ' || errtyp);
--Message('ERROR CODE : ' || errnum);
--Message('ERROR TEXT : ' || errtxt);
ELSE
message('Reports successfully submitted to the report server.');
END IF;
END;
-- Get report status!
rep_status := REPORT_OBJECT_STATUS(v_rep);
--message('Report status: ' || rep_status);
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://'||app_server||app_svr_port||'/reports/rwservlet/getjobid'||
substr(v_rep,instr(v_rep,'_',-1)+1)||'?server='||rpt_Server,'_blank');
ELSE
message('Error when running report');
END IF;
END;
Hope it helps!
|
|
|
Re: Calling reports from forms10G [message #440582 is a reply to message #440546] |
Mon, 25 January 2010 22:42 |
tamzidulamin
Messages: 132 Registered: October 2009 Location: Dhaka
|
Senior Member |
|
|
Hi kavin58,
app_server VARCHAR2(80) := GET_APP_SERVER;
app_svr_port VARCHAR2(80) := GET_SVR_PORT;
rpt_server VARCHAR2(80) := GET_RPT_SERVER;
How it works?
Is GET_APP_SERVER built-in (or User defined function) of forms/database?, please make it clear.
It will be helpful for everybody.
Regards
Tamzidul Amin
[EDITED by LF: removed unnecessary quote of the entire previous message]
[Updated on: Tue, 26 January 2010 00:41] by Moderator Report message to a moderator
|
|
|
Re: Calling reports from forms10G [message #440629 is a reply to message #440582] |
Tue, 26 January 2010 06:16 |
Kevin58
Messages: 79 Registered: January 2009
|
Member |
|
|
Howdy,
Yes those are functions that I have created to read in
those parameters from a database table.
Notice also, that one can override those values by the commented out code:
--Temporary override of report server name
--rpt_server := 'HWY10613';
--app_server := 'HWY10613.dot.int.lan';
--app_svr_port := ':8889';
Just trying to help where I ran into issues with calling
reports from within a form.
Hope that it helps.
Thanks,
Kevin
|
|
|