Application hangs while running a report from Forms

Hi all,
I am getting a problem regarding running reports from Oracle forms application for printing in a shared printer at client system. There is no problem when I set the DESTYPE to HTMLCSS or FILE. But when I set it to PRINTER then the application hangs and report server gets busy. Once this problem occurs other reports from other client systems are not generating even if this is a HTMLCSS or FILE type.
The thing is the application has ran successfully for two months. Suddenly from last few days the problem is arising.
Few things that I have noticed:
1) When the application hangs I cheked the Task manager, where the process rwlpr.exe is running. If I manually ends the process there the application comes back with a message 'unable to run report'.
2) I have checked few log files, where I have found few log files whose names end with a job number. The file generates from a succesfully running report shows few steps tht end s with closing the printer. But the file that is generated from an unsuccessfull job stops at the step 'Opening Printer //<machine name>/<printer share name>'.
3) Then finally I have changed the DESTYPE to file and using the HOST command printing the text file to shared printer in dos mode. Its working fine. But often the first problem arises again.
What are the possible resons that may cause this problem.
Looking for your positive response.
Thanks and regards
Sandy

From dos prompt I have used the type commad.
From server machine in dos prompt I have used,
type d:\rep.txt > \\<client machine name>\<printer shared name that is connected to client printer>
from Server machine I have opened a Notepad doc, File >Print >Selected the printer that is in client machine.
This works fine.
Now my code to print a report directly to printer,
V_PRINTERNAME := '\\mmondal\mmondalprn'; -- shared Printer name at Client machine
repid := find_report_object('REP_BANK_MST');
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,PRINTER);
SET_REPORT_OBJECT_PROPERTY(repid,REPORT_DESFORMAT,'dflt');
SET_REPORT_OBJECT_PROPERTY(repid,REPORT_DESNAME,V_PRINTERNAME);
SET_REPORT_OBJECT_PROPERTY(repid,REPORT_SERVER,'kt30');
SET_REPORT_OBJECT_PROPERTY(repid,REPORT_OTHER,'paramform=no P_ISPOSTED='||:CHK_ISPOSTED);
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
WEB.SHOW_DOCUMENT('/reports/rwservlet/getjobid'||
substr(v_rep,instr(v_rep,'_',-1)+1)||'?'||'server=kt30','_blank');
ELSE
message('Error when running report');
END IF;
exception when others then
     message(to_char(sqlcode));
This hngs the application. And other requests enqued in job queue does not process. If I cancel the stucked job then other reports complete sucessfully.
Log - rwserver.trc shows the following:
[2011/6/14 4:48:28:437] Debug 50103 (JobManager:updateJobStatus): Finished updating job: 1051
[2011/6/14 4:48:28:484] Debug 50103 (RWCacheItem:addFile): add file 'mmondalprn65558177.txt' for job 1051
[2011/6/14 4:48:28:484] Debug 50103 (RWCache:updateCurrentCapacity): Current cache capacity is 32948731
[2011/6/14 4:48:30:671] Exception 50157 (): Error while sending file to printer \\mmondal\mmondalprn. Exit with error code 1848
oracle.reports.RWException: IDL:oracle/reports/RWException:1.0
     at oracle.reports.utility.Utility.newRWException(Utility.java:756)
     at oracle.reports.utility.SOSD.sendPrinter(SOSD.java:128)
     at oracle.reports.server.DesPrint.sendFile(DesPrint.java:102)
     at oracle.reports.server.Destination.send(Destination.java:484)
     at oracle.reports.server.JobObject.distribute(JobObject.java:1582)
     at oracle.reports.server.JobManager.updateJobStatus(JobManager.java:2231)
     at oracle.reports.server.EngineCommImpl.updateEngineJobStatus(EngineCommImpl.java:134)
     at oracle.reports.server._EngineCommImplBase._invoke(_EngineCommImplBase.java:94)
     at com.sun.corba.se.internal.corba.ServerDelegate.dispatch(ServerDelegate.java:353)
     at com.sun.corba.se.internal.iiop.ORB.process(ORB.java:280)
     at com.sun.corba.se.internal.iiop.RequestProcessor.process(RequestProcessor.java:81)
     at com.sun.corba.se.internal.orbutil.ThreadPool$PooledThread.run(ThreadPool.java:106)
[2011/6/14 4:48:30:671] State 56016 (JobManager:updateJobStatus): Job 1051 status is: Executed successfully but there were some errors when distribute the output
REP-50159: Executed successfully but there were some errors when distribute the output
[2011/6/14 4:48:30:671] Debug 50103 (JobManager:notifyWaitingJobs): Master job 1051 notify its duplicated jobs.
[2011/6/14 4:48:30:671] Debug 50103 (JobManager:updateJobStatus): Finished updating job: 1051
[2011/6/14 4:48:30:671] Debug 50103 (EngineManager:updateEngineState): Engine rwEng-0 status is 1
[2011/6/14 4:48:30:671] State 56004 (EngineInfo:setState): Engine rwEng-0 state is: Ready
[2011/6/14 4:48:30:671] Exception 50159 (): Executed successfully but there were some errors when distribute the output
oracle.reports.RWException: IDL:oracle/reports/RWException:1.0
     at oracle.reports.server.JobManager.runJobInEngine(JobManager.java:1009)
     at oracle.reports.server.JobManager.runJobLocal(JobManager.java:1779)
     at oracle.reports.server.JobManager.dispatch(JobManager.java:1045)
     at oracle.reports.server.ConnectionImpl.runJob(ConnectionImpl.java:1280)
     at oracle.reports.server._ConnectionImplBase._invoke(_ConnectionImplBase.java:401)
     at com.sun.corba.se.internal.corba.ServerDelegate.dispatch(ServerDelegate.java:353)
     at com.sun.corba.se.internal.iiop.ORB.process(ORB.java:280)
     at com.sun.corba.se.internal.iiop.RequestProcessor.process(RequestProcessor.java:81)
     at com.sun.corba.se.internal.orbutil.ThreadPool$PooledThread.run(ThreadPool.java:106)
[2011/6/14 4:48:30:671] Debug 50103 (JobManager:runJobInEngine): Encounted exception in job 1051
[2011/6/14 4:48:30:671] Debug 50103 (ConnectionImpl:runJob): jobid = 1051 Failed with exceptionoracle.reports.RWException: IDL:oracle/reports/RWException:1.0
[2011/6/14 4:48:30:671] Exception 50159 (): Executed successfully but there were some errors when distribute the output
oracle.reports.RWException: IDL:oracle/reports/RWException:1.0
     at oracle.reports.server.JobManager.runJobInEngine(JobManager.java:1009)
     at oracle.reports.server.JobManager.runJobLocal(JobManager.java:1779)
     at oracle.reports.server.JobManager.dispatch(JobManager.java:1045)
     at oracle.reports.server.ConnectionImpl.runJob(ConnectionImpl.java:1280)
     at oracle.reports.server._ConnectionImplBase._invoke(_ConnectionImplBase.java:401)
     at com.sun.corba.se.internal.corba.ServerDelegate.dispatch(ServerDelegate.java:353)
     at com.sun.corba.se.internal.iiop.ORB.process(ORB.java:280)
     at com.sun.corba.se.internal.iiop.RequestProcessor.process(RequestProcessor.java:81)
     at com.sun.corba.se.internal.orbutil.ThreadPool$PooledThread.run(ThreadPool.java:106)
[2011/6/14 4:48:30:703] Info 56013 (ConnectionManager:release): Connection 196 is released
[2011/6/14 4:48:30:703] Info 56013 (ConnectionManager:release): Connection 197 is released
[2011/6/14 4:48:31:31] Debug 50103 (JobManager:removeJob): will remove job 51
[2011/6/14 4:48:31:31] Debug 50103 (RWCache:deleteItem): delete item for job 51
[2011/6/14 4:48:31:31] Debug 50103 (RWCacheItem:clear): job 51 become invalid
[2011/6/14 4:48:31:31] Debug 50103 (RWCache:updateCurrentCapacity): Current cache capacity is 32942484
[2011/6/14 4:48:31:46] Debug 50103 (JobManager:removeJob): removed job 51
[2011/6/14 4:48:47:906] Info 56013 (ConnectionManager:release): Connection 198 is released
[2011/6/14 4:48:51:890] Info 56013 (ConnectionManager:release): Connection 199 is released
[2011/6/14 4:50:48:437] Info 56013 (ConnectionManager:release): Connection 200 is released
Most of the time when all the instances are restarted then for the first time it runs successfully.
The above code worked fine for Last two months.

Similar Messages

  • Problem in running oracle report from form 10g Version 10.1.2.0.2

    Hi All,
    I am facing problem while running the report from forms 10g getting FRM-41219
    For this i am using the following procedure :
    PROCEDURE RUN_REPORT IS
    L_RUN_TEXT VARCHAR2 (2000);
    L_USRID VARCHAR2 (100);
    L_PASSWD VARCHAR2 (100);
    L_DESNAME VARCHAR2 (100);
    FILE_OUT_PUT VARCHAR2(200);
    REP_STATUS VARCHAR2(20);
    REP_NAME VARCHAR2(50);
    PL_ID PARAMLIST;
    REP_URL VARCHAR2(2000);
    V_REP VARCHAR2(200);
    BEGIN
    display_me('RUN_REPORT');
    -- CALL THE FOLLOWING FUNCTION, IN WHICH USER CAN WRITE HIS OWN CODE.
    -- THE PROCEDURE CAN BE MADE LOCAL TO THE SPECIFIC FORM AND WRITE THE CODE.
    -- IT SHOULD RETURN 'Y', IF YOU WANT TO PROCEED WITH THIS RUN_REPORT
    -- PROCEDURE.
    IF NVL (RUN_REPORT1, 'Y') = 'N' THEN
    RETURN;
    END IF;
    COMMIT_FORM;
    IF (GET_APPLICATION_PROPERTY (OPERATING_SYSTEM)) = 'UNIX' THEN
    L_DESNAME := 'LP';
    ELSE
    L_DESNAME := NAME_IN ('REPORT_TITLE.F_FILE_NAME');
    display_me(L_DESNAME);
    END IF ;
    /* SETTING THE REPORT OBJECT PROPERTIES */
    /* G_PRAM1 IS THE NAME OF REPORT ****/
    SET_REPORT_OBJECT_PROPERTY('REPOBJ',REPORT_EXECUTION_MODE,BATCH);
    SET_REPORT_OBJECT_PROPERTY('REPOBJ',REPORT_COMM_MODE,SYNCHRONOUS);
    SET_REPORT_OBJECT_PROPERTY('REPOBJ',REPORT_DESTYPE,CACHE);
    SET_REPORT_OBJECT_PROPERTY('REPOBJ',REPORT_DESFORMAT,'PDF');
    SET_REPORT_OBJECT_PROPERTY('REPOBJ',REPORT_SERVER,'172.18.76.34');
    SET_REPORT_OBJECT_PROPERTY('REPOBJ',REPORT_FILENAME,:GLOBAL.G_PARAM1||'.REP');
    display_me(':GLOBAL.G_PARAM1 '||:GLOBAL.G_PARAM1);
    PL_ID := GET_PARAMETER_LIST ('REP_PARA');
    IF NOT ID_NULL (PL_ID) THEN
    DESTROY_PARAMETER_LIST ('REP_PARA');
    END IF;
    PL_ID := CREATE_PARAMETER_LIST('REP_PARA');
    ADD_PARAMETER (PL_ID, 'DESTYPE' , TEXT_PARAMETER, NAME_IN ('REPORT_TITLE.RAG_DESTINATION') );
    ADD_PARAMETER (PL_ID, 'DESNAME' , TEXT_PARAMETER, L_DESNAME);
    ADD_PARAMETER (PL_ID, 'COPIES' , TEXT_PARAMETER, NAME_IN ('REPORT_TITLE.F_NO_COPY') );
    ADD_PARAMETER (PL_ID, 'ORIENTATION', TEXT_PARAMETER, 'LANDSCAPE');
    ADD_PARAMETER (PL_ID, 'MODE' , TEXT_PARAMETER, 'BITMAP');
    ADD_PARAMETER (PL_ID, 'PARAMFORM' , TEXT_PARAMETER, 'NO');
    ADD_PARAMETER (PL_ID, 'PARAM' , TEXT_PARAMETER, NAME_IN ('IBP_REPORT_PARAMETER.F_REP_SEQ') );
    ADD_PARAMETER (PL_ID, 'P_COMP_CODE' ,TEXT_PARAMETER,:GLOBAL.G_COMP_CODE);
    display_me(':GLOBAL.G_COMP_CODE '||:GLOBAL.G_COMP_CODE);
    REP_NAME := :GLOBAL.G_PARAM1||'.REP';
    display_me('REP_NAME'||REP_NAME);
    V_REP := RUN_REPORT_OBJECT('REPOBJ');
    display_me('V_REP '||V_REP);
    REP_STATUS := REPORT_OBJECT_STATUS(V_REP);
    display_me('REP_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
    REP_URL:='/REPORTS/RWSERVLET/GETJOBID'||SUBSTR(V_REP,INSTR(V_REP,'_',-1)+1)||'?'||'SERVER=172.18.76.34';
    display_me('REP_URL '||REP_URL);
    WEB.SHOW_DOCUMENT(REP_URL,'_BLANK');
    ELSE
    MESSAGE('ERROR WHEN RUNNING REPORT');
    END IF;
    END;
    Which is called on a button , can any body share there idea to help out
    Warm Regards
    Ashutosh

    Yes, I have replace the userid with scott/tiger@orcl with i6menu/i6menu@vbs and also replace the OAS server's name as you have suggested.
    declare
         REP_URL varchar2(2000);
    begin
    REP_URL:= '/reports/rwservlet?userid=i6menu/i6menu@vbs&report=testrep_10g.rdf&desformat=pdf&destype=cache&paramform=no';
    WEB.SHOW_DOCUMENT(REP_URL,'_BLANK');
    end;
    I had the 2nd code also but both r not working on my machine ......... !!
    I have made the following setting on my machine:
    1. Registry -> HKEY_LOCAL_MACHINE -> SOFTWARE-> ORACLE-> KEY_DevSuiteHome1->FORMS_PATH ->
    Values is : D:\vision_soft\VSS\exe
    2. Registry -> HKEY_LOCAL_MACHINE -> SOFTWARE-> ORACLE-> KEY_DevSuiteHome1->REPORTS_PATH ->
    Values is : D:\vision_soft\VSS\exe
    3. Entry made in the DevSuiteHome_1\forms\server ->default.env
    FORMS_PATH=D:\vision_soft\VSS\exe
    4. Entry made in the DevSuiteHome_1\reports\confr ->rwservlet.properties
    #SERVER= rep10
    As my forms is working well & but the report are not able to call.
    Could you please let me know is there is any other mandatory setting required for the report 10g.
    Regards,
    Ashutosh

  • While running the report from oracle apps

    Hi,
    While running the report from oracle apps i am getting the below error.
    First time when i ran it it works fine in the second time it is giving the below error like
    MSG-00001: After SRWINIT
    MSG-01000: Label sets failed
    MSG-01000: ORA-06502: PL/SQL: numeric or value error
    REP-1419: 'beforereport': PL/SQL program aborted
    Can anyone please give your kind advice on it.
    Thanks
    Surya...

    what is the application version ?
    is it seeded report ? or customized
    regards

  • How do I find the report server name, and then run paper report from forms?

    How do I find the report server name, and then run paper report from forms?
    I am having a problem running report 9i from forms 9i (see below thread). How do I find out the name of the report server? I checked my C:\ids\reports\conf directory but don't see anything that gives me the name of the reports server. I also don't have a iashome directory.
    Also, I just want to run the paper report (not the web version).
    Thanks.

    Hi,
    please read teh Forms / Reports integration paper in teh Collateral section for Oracle9i Forms at otn.oracle.com/products/forms
    In summary, you have to create an external Reports Service that you can then give a name.
    Frank

  • Run a Report from Forms

    How can I run a Report from Form in a Cliwnt / Server Environment?

    hello,
    see under RUN_REPORT_OBJECT in the forms online manual.
    regards,
    the oracle reports team

  • Error while running Crystal Reports from application

    Hi,
    I am getting the below error when I try to run Crystal Reports from my application.
    There are no Page Servers connected to the Cache Server or all connected Page Servers are disabled or all connected Page Servers are not part of the specified server group. Please try to reconnect later.
    I am able to preview the reports in CMC and Infoview, but when I try to run the same report via my application the above error pops up.
    Sometimes I get a different error:
    The Page Server you are trying to connect to is not accessible. Please contact your system administrator.
    Looks like some configuration settings are missing/ corrupted.
    I tried to look in a number of websites... tried few workarounds, but none seems to be working.
    Any help is highly appreciated.
    Meena
    Edited by: meenakshitikoo1 on Apr 19, 2011 12:46 PM

    Check the following SAP note
    https://service.sap.com/sap/support/notes/1032461
    Regards,
    Stratos

  • Error running 9i reports from forms.

    Hi folks,
    i am having problems running 9i reports from a form.
    i have installed Oracle 9iDS on a Win XP machine with 256 MB RAM and a Pentium 1.4Ghz processor.
    i also have a local Oracle 9i database. i have created several reports that i am trying to run from some forms but all efforts to date have failed.
    below is some sample code.
    declare
    v_rid report_object;
    v_rjob varchar2(100);
    v_rptstatus varchar2(100);
    v_jobid varchar2(100);
    BEGIN
    /*get handle to report object itself*/
    v_rid := find_report_object('pbranchlist');
    set_report_object_property(v_rid,REPORT_EXECUTION_MODE,BATCH);
    set_report_object_property(v_rid,REPORT_DESFORMAT,'htmlcss');
    set_report_object_property(v_rid,REPORT_DESTYPE,'CACHE');
    set_report_object_property(v_rid,REPORT_SERVER,'repsrv');
    set_report_object_property(v_rid,REPORT_COMM_MODE,synchronous);
    v_rjob := run_report_object(v_rid);
    v_rptstatus := report_object_status(v_rjob);
    while v_rptstatus in ('RUNNING','OPENING_REPORT','ENQUEUED') loop
         v_rptstatus := report_object_status(v_rjob);
         message(v_rptstatus);
    end loop;
    if v_rptstatus = 'FINISHED' then
         /*display report in browser*/
    --      web.show_document('http://steve:8888/reports/rwservlet/getjobid'||
    --      substr(v_rptsvrjob,instr(v_rptsvrjob,'_',-1)+1)||'?'||'server=repsrv','_blank');
    web.show_document('/reports/rwservlet/getjobid'||substr(v_rjob,instr(v_rjob,'_',-1)+1)||'?'||'server=repsrv','_blank');
    else
         message('error running Report');
    end if;
    end;
    pbranchlist is defined in the form,
    repsrv is a report server i installed and explicitly started.
    on clicking the button to run the above code, i get a message on the browser status bar as follows
    opening http://steve:8888/reports/rwservlet/getjobid11?server=repsrv...
    that's it. it stays like that forever and a progress bar showing the status of the operation gets to the halfway mark and stays there for up to 15 minutes.
    I eventually halted the operation by clicking the stop button of the browser. The form then becomes totally non-responsive with the mouse indicator changing to the hour-glass shape and a small vertical bar moving rapidly back and forth at the bottom of the form window.
    My only recourse then is to explicitly close the browser window.
    I have already configured Reports to run in non single sign-on mode by setting SINGLESIGNON=NO in the rwservlet.properties file.
    Is there anything i have not done properly?
    Thanks in advance.

    Steve,
    can you check the Reports cache directory if the Reports file got created? I would assume yes, but better check.
    Frank

  • HspRuntimeException while running the report from Workspace

    Hi
    When a user is trying to run a report from Workspace, it prompts teh following error:
    Failed to sync with user provisioning. Check Planning log for detailscom.hyperion.planning.HspRuntimeException
    The report contains 2 grids, 1 pointing to an ASO application, while second pointing to BSO planning application.
    I checked in shared services, the user has the admin access to planning application which is used in the report.
    I tried the following:
    Checked access to planning application for the user
    Restarted the planning application services
    Where in logs will i be able to find details?
    Can anyone suggest some solution?

    Try option 1 then option2:
    Please undertake changes in a test environment. Retest issue and if resolved migrate to other appropriate environments.
    Option 1:
    Verify NETDELAY and NETRETRYCOUNT are at least 1000 & 1500 respectively.
    To set NETDELAY and NETRETRYCOUNT:
    1. Open Essbase.cfg located in Essbase\Bin directory.
    2. Add the following entries
    NETDELAY 1000
    NETRETRYCOUNT 1500
    Restart Essbase agent (windows service)
    Option 2:
    Please backup the registry before making any manual modification.
    1.) Open the Registry
    2.) Navigate to Local Machine\System\CurrentControlSet\Services\TCPIP\Parameters
    3.) Add new DWORD Value named TcpTimedWaitDelay, right click and select Modify. Select decimal radio button, type in 30. (The default value of this parameter is 2 minutes. This is how long it will take for a TCP/IP port that was used by the network for a connection to be released and made available again. 30 sec is the minimum allowed by Microsoft)
    4.) Add new DWORD Value named MaxUserPort, right click and select Modify. Select decimal radio button, type in 65534. ( The default value is 5000.
    This determines the highest port number TCP can assign when an application requests an available user port from the system.
    5.) Add new DWORD Value named MaxFreeTcbs, right click and select Modify.
    Select decimal radio button, type in 6250. (The default value is 2000. This determines the number of TCP control blocks (TCBs) the system creates to support active connections. Because each connection requires a control block, this value determines how many active connections TCP can support simultaneously. If all control blocks are used and more connection requests arrive, TCP can prematurely release connections in the TIME_WAIT state in order to free a control block for a new connection.)
    The above parameters need to be added to the registry on the Planning and Essbase servers. Reboot the servers after the parameters are added.

  • Error running the report from Form

    Hi,
    I am try to run the report from the form by using these code of line
    DECLARE
         RPT_OBJECT      REPORT_OBJECT;
         RPT_RUN          VARCHAR2(100);
    BEGIN
    RPT_OBJECT := FIND_REPORT_OBJECT('REPORT7');
    SET_REPORT_OBJECT_PROPERTY(RPT_OBJECT, REPORT_COMM_MODE, SYNCHRONOUS);
    SET_REPORT_OBJECT_PROPERTY(RPT_OBJECT, REPORT_DESTYPE, CACHE);
    SET_REPORT_OBJECT_PROPERTY(RPT_OBJECT, REPORT_OTHER,'P_CITYCODE'||:CITYCODE||'PARAMFORM = YES');
    RPT_RUN := RUN_REPORT_OBJECT(RPT_OBJECT);
    END;
    but i m not using any Form server and Report Server i m completly using Oracle9iDS
    It gives the error rep-0110 file not found and
    rep-1070 error while opening and saving the file
    please give me the solution
    Shehzad

    Shehzad,
    this means that Reports Server cannot access the Reports module. You can test this assumption by copying your Reports module into <Oracle Home>\reports\samples\demo. The demo directory is out of the box accessible fro Reports.
    If this allows you to run the Report, then all you need to do is to specify the Reports_Path to include the reports modules.
    btw.: An other reason can be that your Reports contains uncompiled PLSQL, so you may want to check this too.
    Frank

  • Rep-52005 error when running a report from form with parameter form

    I am trying to run a report from a web deployed form and this report has a parameter form. I am getting a Rep-52005: The specified key report does not exist in key map file.
    I am using Oracle Forms/Reports 10.1.2.0.2. My code is below. The first part works fine where I run a report with no parameter form, but the second part when I have a parameter form gets the about error.
    PROCEDURE call_report (
    p_report_name VARCHAR2,
    p_reportobj_name VARCHAR2 DEFAULT NULL,
    p_parameter_list paramlist DEFAULT NULL,
    p_parameter_string VARCHAR2 DEFAULT NULL
    IS
    repid report_object;
    v_rep VARCHAR2 (100);
    rep_status VARCHAR2 (100);
    v_report_url VARCHAR2 (240);
    v_interface VARCHAR2 (50);
    v_report_parameter VARCHAR2 (1);
    vc_user_name VARCHAR2 (100);
    vc_user_password VARCHAR2 (100);
    vc_user_connect VARCHAR2 (100);
    vc_connect VARCHAR2 (300);
    v_reportserv VARCHAR2 (30);
    v_job_number number;
    BEGIN
    /* Get the database to run the report against and
    find out if the report has any parameters */
    SELECT report_parameter_flag
    INTO v_report_parameter
    FROM program_list
    WHERE program_type = 'REPORTS'
    AND UPPER (screen_id) = UPPER (p_report_name);
    vc_user_name := get_application_property (username);
    vc_user_password := get_application_property (password);
    vc_user_connect := get_application_property (connect_string);
    v_reportserv := 'rep_xxxx_ias10g_home';
    v_report_url := 'http://xxxx.state.il.us';
    v_job_number := length(v_reportserv) +2;
    vc_connect :=
    vc_user_name
    || '/'
    || vc_user_password
    || '@'
    || vc_user_connect;
    v_interface := get_application_property (user_interface);
    IF ( v_interface = 'WEB'
    AND v_report_parameter = 'N'
    THEN
    repid := find_report_object(p_reportobj_name);
    set_report_object_property (repid, report_comm_mode, synchronous);
    set_report_object_property (repid, report_destype, cache);
    set_report_object_property (repid, report_desformat, 'pdf');
    -- v_reportserv := get_report_object_property (repid,report_server);
    set_report_object_property (repid, report_server, v_reportserv);
    set_report_object_property (repid, report_other, p_parameter_string);
    v_rep := run_report_object (repid);
    rep_status := report_object_status (v_rep);
    IF rep_status = 'FINISHED'
    THEN
    web.show_document (
    v_report_url
    || '/reports/rwservlet/getjobid='
    || substr(v_rep,v_job_number)
    || '?server='
    || v_reportserv
    ,'_blank'
    ELSE
    message ( rep_status
    || 'Report output aborted');
    END IF;
    ELSIF ( v_interface = 'WEB'
    AND v_report_parameter = 'Y'
    THEN
    repid := find_report_object (p_reportobj_name);
    set_report_object_property (repid, report_comm_mode, synchronous);
    set_report_object_property (repid, report_destype, cache);
    set_report_object_property (repid, report_desformat, 'pdf');
    set_report_object_property (repid, report_server, v_reportserv);
    set_report_object_property (
    repid,
    report_other,
    'paramform=yes P_USER_CONNECT='
    || vc_connect
    || ' P_SERVERNAME='
    || v_reportserv
    || ' P_ACTION='
    || v_report_url
    || '/reports/rwservlet'
    v_rep := run_report_object (repid);
    rep_status := report_object_status (v_rep);
    IF rep_status = 'FINISHED'
    THEN
    web.show_document (
    v_report_url
    || '/reports/rwservlet/getjobid='
    || substr(v_rep,v_job_number)
    || '?server='
    || v_reportserv
    ,'_blank'
    ELSE
    message ( rep_status
    || 'Report output aborted');
    END IF;
    ELSE
    run_product (
    reports,
    p_report_name,
    synchronous,
    runtime,
    filesystem,
    p_parameter_list,
    NULL
    END IF;
    EXCEPTION
    WHEN OTHERS
    THEN
    message (SQLERRM);
    END;
    My parameter form comes up and I enter the necessary information and hit submit query button. Then I get the Rep-52005: The specified key report does not exist in key map file.
    Any help will be greatly appreciated!!
    Shellie Bricker

    Your code seems to be implementing metalink note 139546.1 - Using Reports parameter forms with RUN_REPORT_OBJECT on the web.
    For what I can see, the P_ACTION parameter should end in ?...
    i.e.
    P_ACTION=http://<hostname.domain:port>/reports/rwservlet?'
    set_report_object_property (
    repid,
    report_other,
    'paramform=yes P_USER_CONNECT='
    || vc_connect
    || ' P_SERVERNAME='
    || v_reportserv
    || ' P_ACTION='
    || v_report_url
    || '/reports/rwservlet?'
    );If this does not fix your problem, then to troubleshoot further you would have to post the code in your Before Parameter Form trigger of your report.
    Hope this helps,
    UPDATE:
    If the above does not fix your problem, my guess is that report name is not being generated in the hidden runtime values build by the code in the Before Parameter Form trigger.
    i.e.
    http://localhost:8889/reports/rwservlet?report=&destype=cache&desformat=PDF
    The above code will throw error REP-52005: The specified key report does not exist in key map file.
    Edited by: Rodolfo Ferrari on Jul 8, 2009 9:43 PM

  • Problem while running the report from a form

    Hi,
    I am able to call a report from forms9i using run_report_object. This report just has a boilertext within it. I did this just to check the functionality of run_report_object built-in. This worked perfectly.
    But when I am trying to call a report based on emp table from the form, it gives me error saying that it cannot run the report.
    Can anyone please help me.
    Thanks
    Narain

    Hi Ino Laurensse ,
    Thanks for the response.
    The error code and message is as follows
    frm-41214 Unable to run report.
    I am able to call from forms9i a report with some boilertext but not a report accessing the database. Thro' out I have never changed the username.
    The following are the changes I made
    In the rwservlet.properties
    I specified the
    reportserver name = repsrv ( I created it and started from the services)
    singlesignon = no
    I am able to run the report which is accessing the emp table from the report builder with the same user as the one which I am using in forms, but, the same I am not able to call from forms.
    thanks
    Narain

  • How to Check the report is Finished while calling a report from Forms 6i

    Dear All,
    I am Calling a report from oracle forms 6i, after runing report in " Run_Product(REPORTS,:fn_cntl.nb_report_name,ASYNCHRONOUS, RUNTIME, FILESYSTEM,pl_id, NULL);"
    I need to copy the pdf to store it in another place once the report is generated.
    My Problem is : that i want ot Check first the report has generated after " Run_Product(REPORTS,:fn_cntl.nb_report_name,ASYNCHRONOUS, RUNTIME, FILESYSTEM,pl_id, NULL);" is executed ? How to check the report is generated ot not?
    As i tried to use the below procedure after "Run_Product(REPORTS,:fn_cntl.nb_report_name,ASYNCHRONOUS, RUNTIME, FILESYSTEM,pl_id, NULL);"" but his does not work... nothing happens
    {code}
    PROCEDURE FPC_COPY_REPORT (p_report_name varchar2) IS
         repid REPORT_OBJECT;
         v_rep VARCHAR2(100);
         rep_status varchar2(20);
         lv_id varchar2(1000);
    BEGIN
    repid := find_report_object('AMTP_995.RDF');
    v_rep := RUN_REPORT_OBJECT(repid);
    rep_status := REPORT_OBJECT_STATUS(v_rep);
         if rep_status = 'FINISHED' then
         message('Report Completed'); message('Report Completed');
         else
              message('Error when running report.');           message('Error when running report.');
         end if;
    END;
    {code}
    Any Help

    actually My code is this:
    declare
         ln_alert          number;
         pl_id               ParamList;
         lv_report_name varchar2(10000);
         lv_path  varchar2 (100) := 'C:\';
         lv_shared_path  varchar2(1000);
         lv_copy_file varchar2(10000);
      cursor cr_dir_path IS
      select v_dir_path
      from md_directory
      where v_dir_code ='SHR';
      lv_file_name varchar2(1000);
    BEGIN
      open cr_dir_path;
      fetch cr_dir_path into lv_shared_path;
      close cr_dir_path;
    lv_report_name :=  lv_path||:fn_cntl.nb_ref_no||'_M08600000_'||to_char(sysdate,'YYYYMMDD-HHmmss')||'.pdf';
      if ffn_check_fields  THEN
         pl_id := Get_Parameter_List('LAI');
             IF NOT Id_Null(pl_id) THEN
                 Destroy_Parameter_List( pl_id );
              END IF;             
              pl_id := Create_Parameter_List('LAI');
           if :fn_cntl.nb_report_name ='MMAT_REPORT'
                then
                     if :fn_cntl.nb_report_desc ='EXPORT'
                          then
                         Add_Parameter(pl_id, 'PARAMFORM',TEXT_PARAMETER, 'NO');
             Add_Parameter(pl_id, 'DESTYPE',  TEXT_PARAMETER,'File');
            Add_Parameter(pl_id, 'DESNAME',  TEXT_PARAMETER, lv_report_name);
            Add_Parameter(pl_id, 'DESFORMAT',TEXT_PARAMETER,'PDF');
            Add_Parameter(pl_id, 'p_mat_no',TEXT_PARAMETER, :fn_cntl.nb_mat_no);   
            Add_Parameter(pl_id, 'p_ref_no',     TEXT_PARAMETER, :fn_cntl.nb_ref_no);
            Add_Parameter(pl_id, 'p_verified_by',TEXT_PARAMETER, user);
                     Run_Product(REPORTS,:fn_cntl.nb_report_name,ASYNCHRONOUS, RUNTIME, FILESYSTEM,pl_id, NULL);
          DECLARE     
               repid REPORT_OBJECT;     v_rep VARCHAR2(100);     rep_status varchar2(20);BEGIN
                         /* REP_OBJ= REPORT OBJECT CREATED UNDER REPORT NODE AT FORM */
             repid := find_report_object('MMAT_REPORT');      v_rep := RUN_REPORT_OBJECT(repid);
                        rep_status := REPORT_OBJECT_STATUS(v_rep);          
          if rep_status = 'FINISHED' then
              message('Report Completed');          message('Report Completed');
             --copy_report_object_output(v_rep,'c:\local.pdf');
             -- host('netscape c:\tlocal.pdf');     
         else          message('Error when running report.');
                                          message('Error when running report.');     
         end if;
                 END;
         end if;
      end if;
           if :fn_cntl.nb_report_desc ='EXPORT'
                then
                  error_handler('This report will be Storde in ' ||lv_report_name||' and '||lv_shared_path|| ' Location',3);
                     lv_copy_file :='copy '||' "'||lv_report_name||'" "'||lv_shared_path||'"';
                     host(lv_copy_file,no_screen);
                  error_handler('Report Has been Generated Sucessfully.',3);
           end if;
        end if;
    END;I will try first the another solution you have replied perviously... and will let you no the results... thanks a lot...

  • How can i run a reports from forms

    Oracle forms 9i
    Hai All
    I am using oracle forms 9i.
    From the forms i need to generate a reports how can i generate a reports from there
    Regards
    Srikkanth.M

    there are hundreds of examples in this forum. Do a search

  • Run Crystal Report From Forms

    Dear all,
    Can i run a crystal report from forms10g ? if i yes then how can i do it
    Thanks in advance

    I have to be honest I don't know much about crystal reports.
    In addition to the suggestion of Francois, if you can access/run it via a URL you could use the web.show_document procedure with the url containing all your required parameters, which is similar to some of the method available to run oracle reports.
    eg. web.show_document(http://ServerNameDetails?parameter1=1&parameter2=hello,'_blank');

  • Problem while running the report from stored procedure

    Hi,
    I using stored procedure to generate my report.
    my stored procedure's code looks like this.
    CREATE OR REPLACE PROCEDURE PROJECTOVERVIEWREPORT1(query in VARCHAR2)
    IS
    myPlist SRW_PARAMLIST;
    myIdent SRW.Job_Ident;
    myStatus SRW.Status_Record;
    BEGIN
    srw.start_Debugging;
    myPlist := SRW_PARAMLIST(SRW_PARAMETER('',''));
    srw.add_parameter(myPlist,'GATEWAY','http://localhost:8888/reports/rwservlet');
    srw.add_parameter(myPlist,'SERVER','rep_kalyan1');
    srw.add_parameter(myPlist,'REPORT','BillFormat.RDF');
    srw.add_parameter(myPlist,'USERID','atl3_dev_jul04/atl3_dev_jul04@mgi');
    srw.add_parameter(myPlist,'destype','file');
    srw.add_parameter(myPlist,'desformat','pdf');
    srw.add_parameter(myPlist,'documentnumber','17181');
    srw.add_parameter(myPlist,'papertype','N');
    srw.add_parameter(myPlist,'desname','c:\temp\17181.pdf');
    myIdent := srw.run_report(myPlist);
    myStatus := srw.report_status(myIdent);
    srw.stop_Debugging;
    EXCEPTION
    WHEN NO_DATA_FOUND THEN
    NULL;
    WHEN OTHERS THEN
    NULL;
    END PROJECTOVERVIEWREPORT1;
    Iam running the oc4j instance and the report server in my local machine.
    when i have typed http://localhost:8888/reports/rwservlet
    Iam able to see the help page.
    My rdf file is placed in OralceHome/reports/integ folder.
    Iam executing my stored procedure it is returning some error.
    Iam doing any thing wrong.
    Do i need to modify anything.
    Is the place of rdf file correct.
    plz help me solving the above problem.
    --Kalyan                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                   

    This is the error message iam getting..
    any idea????
    * WELCOME TO EVENT-BASED-REPORTING API *
    * API-Version : 9i *
    * (C) Oracle Corporation, 2000 *
    * Debugging turned ON *************************************
    *** Length of Paramlist : 1
    OK : Parameter added : GATEWAY=http://localhost:8888/reports/rwservlet
    *** Length of Paramlist : 2
    OK : Parameter added : SERVER=rep_kalyan1
    *** Length of Paramlist : 3
    OK : Parameter added : REPORT=BillFormat.RDF
    *** Length of Paramlist : 4
    OK : Parameter added : USERID=atl3_dev_jul04/atl3_dev_jul04@mgi
    *** Length of Paramlist : 5
    OK : Parameter added : DESTYPE=file
    *** Length of Paramlist : 6
    OK : Parameter added : DESFORMAT=pdf
    *** Length of Paramlist : 7
    OK : Parameter added : DOCUMENTNUMBER=17181
    *** Length of Paramlist : 8
    OK : Parameter added : PAPERTYPE=N
    *** Length of Paramlist : 9
    OK : Parameter added : DESNAME=c:\temp\17181.pdf
    Starting run_report: building url
    *** Building URL (RUN_REPORT)
    OK : URL built : http://localhost:8888/reports/rwservlet?SERVER=rep%5Fkalyan1&REPORT=BillFormat%2ERDF&USERID=atl3%5Fdev%5Fjul04%2Fatl3%5Fdev%5Fjul04%40mgi&DESTYPE=file&DESFORMAT=pdf&DOCUMENTNUMBER=17181&PAPERTYPE=N&DESNAME=c%3A%5Ctemp%5C17181%2Epdf&statu
    *** Submitting HTTP Request
    *** using URL :http://localhost:8888/reports/rwservlet?SERVER=rep%5Fkalyan1&REPORT=BillFormat%2ERDF&USERID=atl3%5Fdev%5Fjul04%2Fatl3%5Fdev%5Fjul04%40mgi&DESTYPE=file&DESFORMAT=pdf&DOCUMENTNUMBER=17181&PAPERTYPE=N&DESNAME=c%3A%5Ctemp%5C17181%2Epdf&statusf
    ERROR : HTTP request failed

Maybe you are looking for