Home » Developer & Programmer » Forms » FRM-41214 Unable to run report
FRM-41214 Unable to run report [message #201458] Sat, 04 November 2006 08:50 Go to next message
aarontan78
Messages: 63
Registered: August 2005
Member
Hi all,

I have a parameter form where user enter to parameter and click OK button to call out a report.

However I got this error: FRM-41214 Unable to run report

My code for the WHEN-BUTTON-PRESSED button as below:

Please help!! Embarassed TQ

DECLARE
pl_id ParamList;
repid REPORT_OBJECT;
v_rep varchar2(100);
v_server VARCHAR2(100);
rep_status varchar2(100);
v_host VARCHAR2(100);

BEGIN

v_server := 'rep_user-faf4251ef8';
v_host := 'user-faf4251ef8:8889';
pl_id := Get_Parameter_List('tmpdata');


IF NOT Id_Null(pl_id) THEN
Destroy_Parameter_List( pl_id );
END IF;

pl_id := Create_Parameter_List('tmpdata');
Add_Parameter(pl_id,'FROMDT',TEXT_PARAMETER,:LS.FRDT);
Add_Parameter(pl_id,'TODATE',TEXT_PARAMETER,:LS.TODT);
Add_Parameter(pl_id,'STAFFID',TEXT_PARAMETER,:LS.STAFFID);
ADD_PARAMETER(pl_id,'TITLE',TEXT_PARAMETER,:LS.TITLE);
repid := find_report_object('rep1');

SET_REPORT_OBJECT_PROPERTY(repid,REPORT_FILENAME,'R1');

SET_REPORT_OBJECT_PROPERTY(repid,REPORT_COMM_MODE,SYNCHRONOUS);

SET_REPORT_OBJECT_PROPERTY(repid,REPORT_DESFORMAT,'HTML');
SET_REPORT_OBJECT_PROPERTY(repid,REPORT_SERVER,v_server);
--SET_REPORT_OBJECT_PROPERTY(repid,REPORT_OTHER,'paramform=YES');

v_rep := RUN_REPORT_OBJECT(repid, pl_id);
rep_status := REPORT_OBJECT_STATUS(v_rep);
WHILE rep_status in ('RUNNING','OPENING_REPORT','ENQUEUED')
LOOP
rep_status := report_object_status(v_rep);
message('Running');
END LOOP;
IF rep_status = 'FINISHED' or rep_status is NULL THEN

WEB.SHOW_DOCUMENT('http://'||v_host||'/reports/rwservlet/getjobid'||substr(v_rep,instr(v_rep,'_',-1)+1)||'?'||'server='||v_server,'_b lank');
ELSE
null;
END IF;
END;
Re: FRM-41214 Unable to run report [message #201560 is a reply to message #201458] Sun, 05 November 2006 19:28 Go to previous messageGo to next message
djmartin
Messages: 10181
Registered: March 2005
Location: Surges Bay TAS Australia
Senior Member
Account Moderator
Please review this forum for 'web.show_document'. I suggest throwing as far away as possible the absolutely useless statement 'RUN_REPORT_OBJECT' - its only reason to exist in 9i and 10g is to cause this error 'FRM-41214 Unable to run report'. It is because the report server is not running, just run the 'web.show_document' and the report server will start automatically, if necessary.

Have a look at all these:
Run report - with parameters - good example for 6i
http://www.lv2000.com/articles/runreport.htm
also
http://www.orafaq.com/forum/t/52330/67693/
also the code from xxx
http://www.orafaq.com/forum/m/144539/67467/?srch=web.show_document#msg_144539
Oracle - 9i Reports in Forms White Paper
http://www.oracle.com/technology/products/forms/pdf/277282.pdf
From http://www.orcl-toolbox.com/fapimasterscripts.asp FormsAPI there is 'conv_runprod_runrepobj'

David
Re: FRM-41214 Unable to run report [message #201668 is a reply to message #201560] Mon, 06 November 2006 05:22 Go to previous messageGo to next message
aarontan78
Messages: 63
Registered: August 2005
Member
David,
Thanks for the reply.
I changed my code to below.
However I received error REP-53053: Bad arguments for function call
which I failed to find what is it from the internet.

Pls. help!
Thanks

DECLARE
pl_id ParamList;
repid REPORT_OBJECT;
v_rep varchar2(100);
v_server VARCHAR2(100);
rep_status varchar2(100);
v_host VARCHAR2(100);

BEGIN

v_server := 'rep_user-faf4251ef8';
v_host := 'user-faf4251ef8:8889';
pl_id := Get_Parameter_List('tmpdata');


IF NOT Id_Null(pl_id) THEN
Destroy_Parameter_List( pl_id );
END IF;

pl_id := Create_Parameter_List('tmpdata');
Add_Parameter(pl_id,'FROMDT',TEXT_PARAMETER,:LS.FRDT);
Add_Parameter(pl_id,'TODATE',TEXT_PARAMETER,:LS.TODT);
Add_Parameter(pl_id,'STAFFID',TEXT_PARAMETER,:LS.STAFFID);
ADD_PARAMETER(pl_id,'TITLE',TEXT_PARAMETER,:LS.TITLE);
repid := find_report_object('rep1');

SET_REPORT_OBJECT_PROPERTY(repid,REPORT_FILENAME,'R1');

SET_REPORT_OBJECT_PROPERTY(repid,REPORT_COMM_MODE,SYNCHRONOUS);

SET_REPORT_OBJECT_PROPERTY(repid,REPORT_DESFORMAT,'HTML');
SET_REPORT_OBJECT_PROPERTY(repid,REPORT_SERVER,v_server);
--SET_REPORT_OBJECT_PROPERTY(repid,REPORT_OTHER,'paramform=YES');

WEB.SHOW_DOCUMENT('http://'||v_host||'/reports/rwservlet/getjobid'||substr(v_rep,instr(v_rep,'_',-1)+1)||'?'||'server='||v_server,'_b lank');

END;
Re: FRM-41214 Unable to run report [message #201812 is a reply to message #201668] Mon, 06 November 2006 21:02 Go to previous messageGo to next message
djmartin
Messages: 10181
Registered: March 2005
Location: Surges Bay TAS Australia
Senior Member
Account Moderator
I suggest using the "user_interface = 'WEB'" side of the code in http://www.orafaq.com/forum/m/144539/67467/?srch=web.show_document#msg_144539

David
Re: FRM-41214 Unable to run report [message #202969 is a reply to message #201812] Mon, 13 November 2006 07:58 Go to previous messageGo to next message
aarontan78
Messages: 63
Registered: August 2005
Member
David,

Thanks for the reply
I follow your suggested link with slight modification.
May I know what is the v_connect variable? Is it user schema like: tbl/tbl@xe?

DECLARE
   vrepid                report_object;
   vrep                  VARCHAR2 (100);
   -- 09/08/2004 DJMartin Add WEB style report.
   v_show_document       VARCHAR2 (2000) := '/reports/rwservlet?';
   v_connect             VARCHAR2 (30)   := 'tbl/tbl@xe';
--   v_report_server       VARCHAR2 (30)   := reportsenv_pkg.f_report_server;
   v_report_server       VARCHAR2 (30)   := 'rep_user-faf4251ef8';
   
   
BEGIN
   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=gnrAgenda'
         -- Reports parameters
         || '&destype=CACHE'
         || '&desformat=PDF';
      web.show_document (v_show_document);
   ELSE
      vrepid := FIND_REPORT_OBJECT ('MY_REPORT');
      vrep := RUN_REPORT_OBJECT (vrepid);
      web.show_document
                (   'http://user-faf4251ef8:8889/reports/rwservlet/getjobid'
                 || SUBSTR (vrep, INSTR (vrep, '_', -1) + 1)
                 || '?'
                 || 'server=repserver90',
                 '_blank'
                );
   END IF;
END;

Upd-Mod: Add 'code' tags.

[Updated on: Mon, 13 November 2006 16:56] by Moderator

Report message to a moderator

Re: FRM-41214 Unable to run report [message #203093 is a reply to message #202969] Mon, 13 November 2006 20:29 Go to previous message
djmartin
Messages: 10181
Registered: March 2005
Location: Surges Bay TAS Australia
Senior Member
Account Moderator
I'm sorry but I can't remember exactly. In my examples I have a 'name', for example, 'appl01', 'test02', etc - I think that they are entries in 'formsweb.cfg' or maybe 'tnsnames.ora'.

David
Previous Topic: Regarding List item
Next Topic: Record group
Goto Forum:
  


Current Time: Sat Feb 08 18:31:04 CST 2025