Set_report_object_property

I have included a rdf file as a part of a form. now I am trying to call that report . but before doing so I have to set certain user defined parameters for that report. I basically have two user defined parameters . so I am using the set_report_object_parameter to set the property for REPORT_OTHER.
My question is how do you set this property for more than one user_defined parameter to that report.This is the help I get in the form builder
FUNCTION GET_REPORT_OBJECT_PROPERTY
(report_id REPORT_OBJECT,
property NUMBER
FUNCTION GET_REPORT_OBJECT_PROPERTY
(report_name VARCHAR2,
property NUMBER
Built-in Type unrestricted procedure
Enter Query Mode yes
Parameters
report_id Specifies the unique ID of the report. You can get the report ID for a particular report using FIND_REPORT_OBJECT .
report_name Specifies the unique name of the report.
property One of the following constants:
REPORT_EXECUTION_MODE: Returns a string value of the report execution mode, either BATCH or RUNTIME
REPORT_COMM_MODE: Returns a string value of the report communication mode, either SYNCHRONOUS or ASYNCHRONOUS
REPORT_DESTYPE: Returns a string value of the report destination type, either PREVIEW, FILE, PRINTER, MAIL, CACHE or SCREEN
REPORT_FILENAME: Returns a string value of the report filename
REPORT_SOURCE_BLOCK: Returns a string value of the report source block name
REPORT_QUERY_NAME: Returns a string value of the report query name
REPORT_DESNAME: Returns a string value of the report destination name
REPORT_DESFORMAT: Returns a string value of the report destination format
REPORT_SERVER: Returns a string value of the report server name
REPORT_OTHER: Returns a string value of the other user-specified report properties
It is working okay for one paramaeter but
HOW DO I SET FOR MORE THAN ONE USER DEFINED REPORT_PARAMAETER ???
Thanks
aruna

I am currently using that. But somehow that seems to give me REP 0999 error when I am using generate to file delimited or html option. Now this is happening when I have break groups in my report, oterwise it is working fine.
Any help regarding this
aruna
<BLOCKQUOTE><font size="1" face="Verdana, Arial">quote:</font><HR>Originally posted by Helena Markova ([email protected]):
I think that it would be better for
you to see RUN_PRODUCT built-in in Forms help. You will see using of a parameter list (Parameters of type DATA_PARAMETER are pointers to record groups in Form Builder) there.
I hope this will help you.
Helena<HR></BLOCKQUOTE>
null

Similar Messages

  • Strange behaviour in SET_REPORT_OBJECT_PROPERTY

    Hi,
    I need to run a report from a Form.
    The Report Parameter are stored in a table and with this parameters I want to set the report properties
    Now if I use this statement (this is an example):
    SET_REPORT_OBJECT_PROPERTY(rep_id, REPORT_DESFORMAT, MYTABLE.REP_DESFORMAT);the property is set correctly.
    But If I use this code:
    DECLARE PR$Format VARCHAR2(100);
    BEGIN
    SELECT REPORT_DESFORMAT
    INTO PR$Format
    FROM MYTABLE
    WHERE ........
    SET_REPORT_OBJECT_PROPERTY(rep_id, REPORT_DESFORMAT, PR$Format);
    END;the parameter is not set.
    And so for the others parameters. I do not understand this curious behaviour.
    Can anyone help me ?
    Greetings...
    Gaetano

    Try this,
    v_param:='paramform=no p_func=' || AddQuote(:control.func_name);
    FUNCTION AddQuote(cText VARCHAR2) RETURN VARCHAR2 IS
    BEGIN
    RETURN (CHR(39) || cText || CHR(39));
    END;
    Message was edited by:
    Denis Demers

  • SET_REPORT_OBJECT_PROPERTY(report_id,REPORT_OTHER,cadena);

    hi
    i have a form that call a report, i send parameters to the report with these SET_REPORT_OBJECT_PROPERTY(report_id,REPORT_OTHER,cadena);, but when cadena is more than 1800 characters, can not run the report,
    can anybody tell me why?
    Oracle reports team help me
    Thanks

    Hi herbe
    If you are Reports 6i, you need to apply the sqlnet patches to resolve this issue. The patch details are:
    1. Sqlnet One-off 8.0.6.3 1554201 available on Solaris
    2. Sqlnet one-off 8.0.6.3 1554201 for Sun SPARC Solaris
    On Metalink, you can find the one-off for other platforms for this respective fix.
    Thanks
    The Oracle Reports team

  • Report_other parameter in set_report_object_property

    Hi everyone,
    I am having trouble passing values from a form to a report. I need to pass a value to report for report_other parameter.
    - p_func is a user parameter in the report.
    - :control.func_name is the block and item name in the form.
    The report works fine if I pass the value as a constant like this
    v_param:='paramform=no p_func=' Air Service';
    However, if I pass the value from an item in forms block... like this
    v_param:='paramform=no p_func=' ||:control.func_name||' ';
    I get this error from reports
    "REP-0788: Warning: The value of restricted LOV parameter P_FUNC is not among the selectable values."
    Thanks in advance for your help.

    Try this,
    v_param:='paramform=no p_func=' || AddQuote(:control.func_name);
    FUNCTION AddQuote(cText VARCHAR2) RETURN VARCHAR2 IS
    BEGIN
    RETURN (CHR(39) || cText || CHR(39));
    END;
    Message was edited by:
    Denis Demers

  • Run_report_object is not working

    Hi everyone
    I am trying to convert my 6i reports into 9i.
    I have added into a report object node in my form all necessary objects. In procedure i call run_report_object and got error 'REP-0503 You did not specify the name of the report' .
    Here is my code(obviousely i am missing something)
    report_id Report_Object;
    report_job_id VARCHAR2(100);
    BEGIN
    v_report_module := v_report_path || v_report_file_name;
    report_id := find_report_object(v_report_file_name);
    SET_REPORT_OBJECT_PROPERTY(report_id,REPORT_EXECUTION_MODE,RUNTIME);
    SET_REPORT_OBJECT_PROPERTY(report_id,REPORT_COMM_MODE,SYNCHRONOUS);
    SET_REPORT_OBJECT_PROPERTY(report_id,REPORT_DESTYPE,PREVIEW);
    SET_REPORT_OBJECT_PROPERTY(report_id,REPORT_FILENAME,v_report_file_name);
    set_report_object_property(report_id, report_other, 'paramform=no');
    report_job_id := RUN_REPORT_OBJECT
    (report_id, pl_id) ;
    END;
    Thanks everyone in advance

    You have to specify a report object name in your Forms module and you pass in that name as a parameter to find_report_object function call.
    HTH,
    Tamas Szecsy

  • Reg: sending an email using report server

    Hi,
    i am using the below code to send an email using the report server.
    When send button Click:
    DECLARE
    PL_ID ParamList;
    repid REPORT_OBJECT;
    v_rep varchar2(100);
    rep_status varchar2(20);
    l_host_name varchar2(50);
    l_port_num varchar2(10);
    l_server_name varchar2(50);
    l_month_name varchar2(20);
    l_from varchar2(50);
    l_to varchar2(50);
    l_cc varchar2(50);
    l_property varchar2(1000);
    l_sub_out varchar2(200);
    l_sub varchar2(400);
    L_BODY VARCHAR2(1000);
    l_email_dir varchar2(50);
    BEGIN
    l_sub:=:block1.number||' '||replace(replace(:block1.desc,'&','ampersand'),'''','$quote');
    if length(l_sub) >150 then
    l_sub_out:=substr(l_sub,0,150);
    else
    l_sub_out:=l_sub;
    end if;
    l_host_name := (i used my host ip address local host);
    l_port_num := '8889';
    l_email_dir := 'C:\forms\';
    l_from := [email protected];
    l_cc := [email protected];
    L_BODY:=' Please refer to the attached abc Report';
    repid := find_report_object('PRINT_REPORT');
    SET_REPORT_OBJECT_PROPERTY(repid,REPORT_FILENAME,'abc');
    SET_REPORT_OBJECT_PROPERTY(repid,REPORT_DESTYPE,MAIL);
    SET_REPORT_OBJECT_PROPERTY(repid,REPORT_DESFORMAT,'PDF');     
    SET_REPORT_OBJECT_PROPERTY(repid,REPORT_SERVER,l_server_name);
    go_block('abc_MAIL_TO');
    first_record;
    if :abc.email_address is not null then
    loop
    l_to:=:abc.email_address;
    SET_REPORT_OBJECT_PROPERTY(repid,REPORT_OTHER, 'paramform=no DISTRIBUTE=YES DESTINATION='||l_email_dir||'test.xml'||' '||
    ' p_2='|| TO_CHAR(:control.sessionid)||' '||'P_ID='||TO_CHAR(:block1.ID)||' '
    ||'P_LIST_TYPE='||'A'||' '     
    ||'DISTRIBUTE=YES DESTINATION=test.xml'||' '
    ||'P_FROM='||''''||l_from||''''||' '
    ||'P_SEND='||''''||l_to||''''||' '
    ||'P_CC='||''''||l_cc||''''||' '
    ||'P_FILE='||'C:\testfile.txt'||' '
    ||'p_email_path='||l_email_dir||' '
    ||'P_BODY='||''''||l_body||''''||' '
    ||'P_NUM='||''''||'Email report: '||l_sub_out||'''');
    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
    null;
    ELSE
    message(rep_status);
    message('Error when sending email to: '||l_to);
    END IF;
    if :system.last_record='TRUE' then
    exit;
    else
    next_record;
    end if;
    end loop;
    end if;
    message ('Mail has been sent.');
    END;
    In the report:
    I created all the required parameters and i wrote a trigger as
    function AfterPForm return boolean is
    dst_file text_io.file_type;
    l_email_dir varchar2(50);
    begin
    dst_file := text_io.fopen(:p_email_path||'test.xml','w');
    text_io.putf(dst_file, '<destinations>'||chr(13));
    text_io.putf(dst_file, '<mail id="ex1" '||chr(13));
    text_io.putf(dst_file, 'from="&P_FROM"'||chr(13));
    text_io.putf(dst_file, 'to="&P_SEND"'||chr(13));
    text_io.putf(dst_file, 'cc="&P_CC"'||chr(13));
    text_io.putf(dst_file, 'subject="&<P_NUM>">'||chr(13));
    text_io.putf(dst_file, '<body srcType="text">'||chr(13));
    text_io.putf(dst_file,'<![CDATA>'||chr(13));
    text_io.putf(dst_file, '</body>'||chr(13));
    text_io.putf(dst_file, '<foreach>'||chr(13));
    text_io.putf(dst_file, '<attach format="pdf" name="report.pdf" srcType="report" instance="all">'||chr(13));
    text_io.putf(dst_file, '<include src="mainSection"/>'||chr(13));
    text_io.putf(dst_file, '</attach>'||chr(13));
    text_io.putf(dst_file, '</foreach>'||chr(13));
    text_io.putf(dst_file, '</mail>'||chr(13));
    text_io.putf(dst_file, '</destinations>'||chr(13));
    text_io.fclose(dst_file);
    return (TRUE);
    end;
    Then after compilation i click the button send. Then i got the message as
    Mail has been sent to [email protected].
    But i didn't receive any mail.
    then i check the report job id. It was showing job was successful .
    And i check whether the test.xml file was created or not. It has created the test.xml file as below:
    <destinations>
    <mail id="ex1"
    from="&amp;P_FROM"
    to="&amp;P_SEND"
    cc="&amp;P_CC"
    subject="&amp;&lt;P_NUM&gt;">
    <body srcType="text">
    <![CDATA Please refer to the attached abc Report]>
    </body>
    <foreach>
    <attach format="pdf" name="report.pdf" srcType="report" instance="all">
    <include src="mainSection"/>
    </attach>
    </foreach>
    </mail>
    </destinations>
    I have 2 machines having dev 10g. one machine is working fine with this code. but in my machine it was not working.
    Do any one of you had a solution for my case.
    Thanks in advance.
    Edited by: user648380 on Dec 29, 2009 5:59 PM

    Sorry to all.
    I made a mistake in the from email address.
    Instead of gmail.com i had given gmail,com
    I am really sorry about it.

  • Print a report to a specific printer from Forms

    I have a form from where i want to print a report to a specific printer (not the default printer). Is there any way to do this from Forms 9i. Im using the Orarrp but it pops up the printer dialog and shows the default printer. Is there any way to harcod the printer name. the printer is on the network..

    If i go to my control pannel and see the list of printers i take the printer name from there. should i put the path of the printer? i kno the port of the printer .it come like ip_192.1.11.1_p1 ..how do i define the printer name? if i dnt give the printer name shouldnt if fire to the default printer ..my code is as follows
    declare
    REPID REPORT_OBJECT;
    V_REP VARCHAR2(100);
    REP_STATUS VARCHAR2(20);
    BEGIN
    REPID := FIND_REPORT_OBJECT('CUS_PRINT');
    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_SERVER,'test');
    SET_REPORT_OBJECT_PROPERTY(REPID,REPORT_OTHER,'P_CUSREF='||:CTRL01.CUSREF||' PARAMFORM=NO');
         MESSAGE('SET REPORT PROP');
    V_REP := RUN_REPORT_OBJECT(REPID);
    REP_STATUS := REPORT_OBJECT_STATUS(V_REP);
    MESSAGE('RAN REPORT');
    WHILE REP_STATUS IN ('RUNNING','OPENING_REPORT','ENQUEUED') LOOP
         REP_STATUS := REPORT_OBJECT_STATUS(V_REP);
    END LOOP;
         IF REP_STATUS = 'FINISHED' THEN
              IF NVL('TEST',' ') <> ' ' THEN
              GEN_ALERT('NULL_ALERT','TEST');
              END IF;
              ELSE
         GEN_ALERT('NULL_ALERT','Error when running report');
         END IF;
    END;
    what should the desformat of the report should be..when im trying to run this it gives me 'no data found' error...why???

  • Print html report

    Hi ,
    In oracle forms 11g, I have a text field that includes html tags.
    I crate a report in report builder 11g, selecting html text from database.
    When I run the report using the
         set_report_object_property(report_id, REPORT_DESTYPE, CACHE);
         set_report_object_property(report_id, REPORT_DESFORMAT,'html');
    WEB.SHOW_DOCUMENT ........
    It gives me the html page ok.
    When I send the report to printer it prints also the html tags e.g. <body> <b>my text ..........<b> </body>.
         set_report_object_property(report_id, REPORT_COMM_MODE, SYNCHRONOUS);
         set_report_object_property(report_id, REPORT_DESTYPE, PRINTER);
         set_report_object_property(report_id, REPORT_DESFORMAT,'HTML');
         set_report_object_property(report_id, REPORT_DESNAME,myprintername);
         set_report_object_property(report_id, REPORT_SERVER,servername);
    Set_Report_Object_Property(report_id, REPORT_OTHER, 'paramform=no');
    v_rep := RUN_REPORT_OBJECT(report_id);
    Can anyone help ?
    Thanks
    Edited by: user1424905 on 21-Jul-2011 04:16

    Hello,
    I think that you need to configure your browser, can you take a look a this article:
    http://www.maxi-pedia.com/scripts+are+usually+safe​+do+you+want+to+allow+scripts+to+run
    Regards,
    Nacer M. | Certified LabVIEW Architecte

  • Can you open a report in Excel/Word desktop instead of the web pugin?

    using run_report_object( and web.show_document,
    how or can you get a report to open in the desktop/full version of MS Excel/Word instead of the web plugin versions?
    I can get the browser to open a report in pdf with my desktop adobe reader, but not with an rtf or xml/delimited desformat.
    Currently I don't pass a mimetype when opening as a pdf, but I do pass one in the url when i am destypes of xml, delimited and rtf,
    as this is the only way i have found out how to open the reports in word/excel.
    I'm in the process of upgrading from forms 6 client/server to 10g developer suite, so this is my try with a web based system.
    Does anyone have any suggestions, or where I should look.
    Below I listed my code from a procedure.
    the first part of the procedure is alot of converting, but if you skip down to the part between the 2 sets of double lines this fairly standard.
    PACKAGE BODY pmc_lib IS
    -- Procedure to run the report.
    procedure run_reports(v_report_name in varchar2, -- Report Name with or w/o a path.
    v_commode in number default synchronous, -- commode
    v_execmode in number default runtime, -- execute mode
    v_file_sys in number default filesystem, -- dummy
    v_param_list in paramlist, -- parameter list
    v_show_modes in varchar2 default null) is -- used for testing,
    -- if set to anthing but null, the report properties will display
    -- on the screen through an alert prior to printing.
    v_errorcode number;
    v_errortext varchar2(600);
    v_initialized boolean := false;
    v_prop_reportserver varchar2(200);
    v_report_path varchar2(200);
    v_user varchar2(100);
    v_user_sessionid number;
    v_forms_version varchar2(100);
    v_default_report_server varchar2(200);
    v_default_server_domain_path varchar2(200);
    v_connect_string varchar2(3) := get_application_property(connect_string);
    v_user_name varchar2(35) := get_application_property(username);
    report_id report_object;
    reportserverjob varchar2(100);
    v_jobid varchar2(100);
    rep_status varchar2(100);
    v_url varchar2(500);
    v_url2 varchar2(500);
    v_parameter_value varchar2(100);
    v_destype_param_value varchar2(100) := null;
    v_desformat_param_value varchar2(100) := null;
    v_desname_param_value varchar2(100) := null;
    v_value_n number := 0;
    v_param_type number := text_parameter;
    v_prop_execmode number;
    v_prop_commode number;
    v_prop_destype number;
    v_prop_filename varchar2(200);
    v_prop_source_block varchar2(200) := null;
    v_prop_query_name varchar2(200) := null;
    v_prop_desname varchar2(200) := null;
    v_prop_desformat varchar2(200) := null;
    v_prop_reportserver varchar2(200) := null;
    v_prop_other varchar2(200) := null;
    v_mimetype varchar2(200) := null;
    v_selected_mimetype varchar2(200) := null;
    report_not_generated exception;
    report_id_not_found exception;
    BEGIN
    v_forms_version := get_application_property(version);
    v_prop_reportserver := get_report_object_property('report1', report_server);
    v_report_path := null;
    v_user := v_user_name || '/' ||
    get_application_property(password) || '@' ||
    v_connect_string;
    if v_connect_string = 'NNN' then
    v_default_server_domain_path := 'pmcoracapp01.aapmc.com/reports/rwservlet';
    v_default_report_server := 'rep_pmcoracapp01_frhome1';
    else
    v_default_server_domain_path := 'oradevsrv.aapmc.com/reports/rwservlet';
    v_default_report_server := 'rep_oradevsrv_frhome1';
    end if;
    v_initialized := true;
    -- Check to see what version of forms is running.
    if substr(v_forms_version, 1, 1) <> '6' then
    -- Check to see if WEB version is running
    -- This may be an unnecessary check.
    if (get_application_property(user_interface) = 'WEB') then
    report_id := find_report_object('report1');
    -- id_null won't work on a report_id in Version 6, may put back in 10g once version 6 is gone completly
    -- if id_null(report_id) then
    -- raise report_id_not_found;
    -- end if;
    -- Because of Convertions from old system the following are needed.
    -- 1) If 'execmode' is runtime, then change it to batch.
    if v_execmode = runtime then
         v_prop_execmode := batch;
    else
         v_prop_execmode := v_execmode;
    end if;
    -- 2) If Report name has an attached path, then remove it.
    v_value_n := instr(lower(v_report_name), 'k:\pmc\new\');
    if v_value_n = 0 then
         v_prop_filename := v_report_name;
    else
         v_prop_filename := substr(v_report_name, v_value_n + 11);
    end if;
    -- From looking at the FORMS, 'destype' parameter is always passed in from the FORM.
    -- It is either 'preview' or 'file'.
    -- This is here for the converstion from Forms 6 to 10g.
    -- If for some reason destype has not been passed in as a parameter, you will get a FORM error,
    -- saying the parameter does not exists.
    begin
    -- 3) If 'destype' is one of the following, then change it to cache.
    get_parameter_attr(v_param_list, 'destype', v_param_type, v_destype_param_value);
    if lower(nvl(v_destype_param_value, 'null')) in ('preview', 'file', 'null') then
    v_prop_destype := cache;
    -- 3a) If 'destype' was = 'file' then check the 'desformat' and 'desname'.
    if lower(nvl(v_destype_param_value, 'null')) = 'file' then
    -- 3b) Get 'desformat' value
    get_parameter_attr(v_param_list, 'desformat', v_param_type, v_desformat_param_value);
    -- 'delimited' was not working, so change all 'delimited' to 'delimiteddata'.
    if lower(nvl(v_desformat_param_value, 'null')) = 'delimited' then
         v_desformat_param_value := 'delimiteddata';
    end if;
    -- 3c) If 'desformat' is NOT one of the following, then change it to pdf.
    if lower(nvl(v_desformat_param_value, 'null')) not in ('pdf', 'xml', 'rtf', 'delimiteddata') then
    v_prop_desformat := 'pdf';
    else
    v_prop_desformat := lower(v_desformat_param_value);
    end if;
    -- 4) Get 'desname' property.
    get_parameter_attr(v_param_list, 'desname', v_param_type, v_desname_param_value);
    v_prop_desname := lower(v_desname_param_value);
    end if;
    else
    v_prop_destype := lower(v_destype_param_value);
    end if;
    exception
    when others then
    null;
    end;
    -- If a desformat is rtf, xml, or delimited then get a mimetype to pass to the url
    if lower(v_prop_desformat) = 'rtf' then
    v_mimetype := '&mimetype=application/msword';
    elsif lower(v_prop_desformat) = 'xml' then
    v_mimetype := '&mimetype=application/vnd.ms-excel';
    elsif lower(v_prop_desformat) = 'delimiteddata' then
    v_mimetype := '&mimetype=application/vnd.ms-excel';
    end if;
    -- 6) If the Following are not set within the Report Object then
    -- set them to the following defaults.
    -- These are al required to be set for the Report Object to Function.
    -- These are the defaults for AAPMC.
    v_prop_execmode := nvl(v_prop_execmode, batch);
    v_prop_commode := nvl(v_prop_commode, synchronous);
    v_prop_destype := nvl(v_prop_destype, cache);
    v_prop_desformat := nvl(v_prop_desformat, 'pdf');
    v_prop_reportserver := nvl(v_prop_reportserver, v_default_report_server);
    -- Set All Report_Object Properties
    set_report_object_property(report_id, report_execution_mode, v_prop_execmode);
    set_report_object_property(report_id, report_comm_mode, v_commode);
    set_report_object_property(report_id, report_destype, v_prop_destype);
    set_report_object_property(report_id, report_filename, v_prop_filename);
    set_report_object_property(report_id, report_source_block, v_prop_source_block);
    set_report_object_property(report_id, report_query_name, v_prop_query_name);
    set_report_object_property(report_id, report_desname, v_prop_desname);
    set_report_object_property(report_id, report_desformat, v_prop_desformat);
    set_report_object_property(report_id, report_server, v_prop_reportserver);
    set_report_object_property(report_id, report_other, v_prop_other);
    -- Run Report_Object
    reportserverjob := run_report_object(report_id, v_param_list);
    v_jobid := substr(reportserverjob, length(v_prop_reportserver) + 2, length(reportserverjob));
    -- If Report Status is not 'FINISHED', then loop till it is.
    if reportserverjob is not null then
    rep_status := report_object_status(reportserverjob);
    while rep_status in ('RUNNING', 'OPENING_REPORT', 'ENQUEUED') loop
    rep_status := report_object_status(reportserverjob);
    end loop;
    if rep_status <> 'FINISHED' then
    raise report_not_generated;
    end if;
    -- Create 1st part of url.
    v_url := 'http://' || v_default_server_domain_path || '/getjobid' || v_jobid || '?server=' || v_prop_reportserver;
    -- Check for mimetype.
    if v_mimetype is not null then
    v_url := v_url || v_mimetype;
    end if;
    -- Final part of url.
    v_url2 := 'javascript:window.open("' || v_url || '", "", "fullscreen=no, titlebar=no, location=no, toolbar=no, menubar=no, status=no, resizable=yes"); self.close()';
    -- This is the built-in that calls a new browser window
    web.show_document(v_url2,'_blank');
    else
    raise report_not_generated;
    end if;
    end if;
    -- Destroy the parameter list.
    destroy_parameter_list(v_param_list);
    else
    -- This section if for Client Server, Version 6 of forms.
    -- It will do the same as before the conversion.
    -- It is only used before the complete conversion.
    if v_report_name is null then
    return;
    end if;
    v_value_n := instr(v_report_name, 'k:\pmc\new\');
    if v_value_n = 0 then
         v_prop_filename := 'k:\pmc\new\' || v_report_name;
    else
    v_prop_filename := v_report_name;
    end if;
    run_product(reports,
    v_prop_filename,
    v_commode,
    v_execmode,
    filesystem,
    v_param_list,
    null);
    end if;      
    -- create history record of the report being run
    insert into pmc_report_history values(
    s_pmc_report_history.nextval,
    v_prop_filename,
    v_user_name,
    sysdate,
    v_forms_version,
    v_jobid,
    v_destype_param_value,
    v_desformat_param_value,
    v_desname_param_value,
    v_prop_destype,
    v_prop_desformat,
    v_prop_desname,
    v_mimetype,
    v_window_open_params);
    commit;
    exception
    when report_id_not_found then
    show_user_alert('ERROR: Cannot Find Report Object!', null);
    when report_not_generated then
    show_user_alert('ERROR: Report Not Generated!', null);
    when others then
    v_errorcode := SQLCODE;
    v_errortext := SQLERRM;
    show_user_alert('ERROR : ' || v_errorcode || ' = ' || v_errortext, null);
    end;
    end;

    What you could try is downloading the report to the client pc using WEBUTIL_FILETRANSFER.URL_TO_CLIENT, then open the locally save file using something like:
    CLIENT_HOST('cmd /c rundll32.exe url.dll,FileProtocolHandler "localfilename"');

  • Can't run report in ASYNCHRONOUS mode

    Hi All,
    I'm trying to make a report run in ASYNCHRONOUS mode. I want to press a button on a form, submit the report to the reports server and be able to navigate within the form while the report is being executed on the reports server.
    My problem is, no matter what mode I choose (ASYNCHRONOUS or SYNCHRONOUS), the mode ALWAYS ends up being SYNCHRONOUS. After I press the button (code below), I get the hourglass and I can't navigate within the form until the report is finished. Then I can view it.
    The reports server I'm using is installed locally on the same PC I'm testing the form.
    Can someone help me please? I'm using using Forms Builder 9.0.2.9.0.
    Thank you,
    Artur
    declare
         v_repid REPORT_OBJECT;
    v_rep in varchar2(100);
    begin
    v_repid := find_report_object('TEST');
    SET_REPORT_OBJECT_PROPERTY(v_repid, REPORT_EXECUTION_MODE, BATCH);
    SET_REPORT_OBJECT_PROPERTY(v_repid, REPORT_COMM_MODE, ASYNCHRONOUS);
    SET_REPORT_OBJECT_PROPERTY(v_repid, REPORT_DESTYPE, 'CACHE');
    SET_REPORT_OBJECT_PROPERTY(v_repid, REPORT_DESFORMAT, 'PDF'); -- OR HTMLCSS
    SET_REPORT_OBJECT_PROPERTY(v_repid, REPORT_SERVER, :TI_REPORTS_SERVER); -- local pc reports server
    v_rep := RUN_REPORT_OBJECT(v_repid, v_param_list);
    end;

    Arthur,
    Communication mode is soemthing forms handles when calling the run report object. Your code looks fine. You might get a quikc answer if you can post this in Forms mailing list
    Thanks
    The Oracle Reports Team

  • Error on generating reports from forms -- 499 Oracle SSO

    hai friends..
    while am tryng to generate a report from a form(without passing any parameters), am
    geting the following message:
    *499 Oracle SSO*
    Oracle SSO
    am posting my code used:
    PROCEDURE RUN_REP_RRO
    ( ip_report_name_incl_path VARCHAR2,
    ip_report_object_name VARCHAR2,
    ip_report_server_name VARCHAR2,
    ip_parameters VARCHAR2
    ) IS
    v_user_name VARCHAR2(60);
    v_password VARCHAR2(60);
    v_database VARCHAR2(60);
    v_report_id REPORT_OBJECT;
    v_report_job_id VARCHAR2(100);
    v_report_status VARCHAR2(100);
    BEGIN
    v_user_name := GET_APPLICATION_PROPERTY(USERNAME);
    v_password := GET_APPLICATION_PROPERTY(PASSWORD);
    v_database := GET_APPLICATION_PROPERTY(CONNECT_STRING);
    v_report_id := FIND_REPORT_OBJECT(ip_report_object_name);
    SET_REPORT_OBJECT_PROPERTY(v_report_id, REPORT_EXECUTION_MODE, RUNTIME);
    SET_REPORT_OBJECT_PROPERTY(v_report_id, REPORT_COMM_MODE, SYNCHRONOUS);
    SET_REPORT_OBJECT_PROPERTY(v_report_id, REPORT_DESTYPE, CACHE);
    SET_REPORT_OBJECT_PROPERTY(v_report_id, REPORT_DESFORMAT, 'HTML');
    SET_REPORT_OBJECT_PROPERTY(v_report_id, REPORT_FILENAME,ip_report_name_incl_path);
    SET_REPORT_OBJECT_PROPERTY(v_report_id, REPORT_SERVER,ip_report_server_name);
    Web.show_document ('/reports/rwservlet?server=rep_auh0030482_app_serv3&paramform=no&REPORT=C:\TESTFORM.rdf&destype=cache&desformat=html&userid=scott/tiger@orcl','_blank');
    pls help me on this issue...

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

  • 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

  • [Urgent Help Required] Report not displaying

    Dear All,
    Please help me with a issue in running report from form. I am using the following code to run a report from a form. The issue is that when i click the button i get all the success messages which are in the code and a new browser window opens but my report is not displaying. Please can any one help me with this issue. I have to submit my project with a week so this is very urgent.
    This is the code I am using:
    DECLARE
         v_report_id Report_Object;
         vc_report_job_id VARCHAR2(100); /* unique id for each Report request */
         vc_rep_status VARCHAR2(100); /* status of the Report job */
    BEGIN
         /* Get a handle to the Report Object itself. */
         v_report_id:= FIND_REPORT_OBJECT('REPORT7');
         message ('report found');
    SET_REPORT_OBJECT_PROPERTY(v_report_id,REPORT_COMM_MODE, SYNCHRONOUS);
         SET_REPORT_OBJECT_PROPERTY(v_report_id,REPORT_DESTYPE,cache);
         SET_REPORT_OBJECT_PROPERTY(v_report_id,REPORT_DESFORMAT,'HTML');
         SET_REPORT_OBJECT_PROPERTY(v_report_id,REPORT_SERVER, 'repserver90');
         vc_report_job_id:=RUN_REPORT_OBJECT(v_report_id);
         message (vc_report_job_id);
         vc_rep_status := REPORT_OBJECT_STATUS(vc_report_job_id);
         message (vc_rep_status);
    IF vc_rep_status='FINISHED' THEN
         web.show_document 'http://localhost:8888/reports/rwservlet/getjobid='||vc_report_job_id ||'?server='|| 'repserver90','_blank');
         ELSE
              message ('Report failed with error message '||vc_rep_status);
         END IF;
    END;

    Any Help in this Regards will be highly appreciated

  • Run a report in Form10g using Application Server

    I Installed Oracle Developer Suite and Oracle Business Intelligence Tools 10g (10.1.2.02).
    I create a report City.jsp in Report Builder 10g.
    I create a report object in Form10g. In dialog box I select use exiting file and browse the file CITY.JSP.
    set property of report
    and write following code in When-Button-Pressed trigger
    DECLARE
         repid REPORT_OBJECT;
         v_rep VARCHAR2(100);
         rep_status VARCHAR2(20);
    BEGIN
         repid := FIND_REPORT_OBJECT('CITY');
         v_rep := RUN_REPORT_OBJECT(repid);
    END;
    No error, No output
    What is I missing ?

    hi
    try something like this.
    DECLARE
    repid REPORT_OBJECT;
    v_rep VARCHAR2(100);
    rep_status VARCHAR2(20);
    plid ParamList;
    vParamValue number;
    BEGIN
    plid := Get_parameter_List('tmp');
    IF NOT Id_Null(plid) THEN
    Destroy_parameter_List( plid );
    END IF;
    plid := Create_parameter_List('tmp');
    add_parameter(plid,'p_parameter_name',text_parameter,to_char(:block.item));
    Add_parameter(plid, 'PARAMFORM', TEXT_parameter, 'NO');
    repid := FIND_REPORT_OBJECT('REPORT6');
    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_OTHER, 'paramform=no');
    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;
    /*Display report in the browser*/
    WEB.SHOW_DOCUMENT('http://machine name:port/reports/rwservlet/getjobid'||substr(v_rep,instr(v_rep,'_',-1)+1)||'?
    '||'server=report_server_name&P_parameter_name='||:block.item||
    '&paramform=no');
    END; sarah

  • Report problem plz help

    hi to all
    Using form6i and run in client server. i cant solve this problem please help to all master :
    I have a text item in forms and button. When i type the Customer_Name in text item then all names appears in reports, i want that when i type the name, only that name will appear .
    Please check what is wrong with my code and steps.
    In report wizard, query statement i put "Select * from S_customer"
    then i call the report in forms..
    Report Property pallette:
    Other Parameters=Customer_Name
    Query names=Select * from s_Customer where Customer_Name=:rep(the text item)
    then in forms the button trigger is when button pressed.below is the code:
    declare
    v_Rep varchar2(100);
    repid report_object;
    Begin
    repid := find_report_object('report');
    SET_REPORT_OBJECT_PROPERTY(repid,REPORT_OTHER,’s_customer=’||:Dept.rep);
    v_rep := run_report_object(repid);
    end;
    advance tnx to all

    Hi,
    You need to bulid a parameter list.
    This is a code sample to run a report from Forms:
    (Place it on a button when-button-pressed trigger, to run the report).
    DECLARE
         repid REPORT_OBJECT;
         v_rep VARCHAR2(100);
         rep_status VARCHAR2(20);
    -- this is the parameter list
         pl_id ParamList;
    pl_name VARCHAR2(10) := 'tempdata';
    BEGIN
    -- try to find the parameter list
    pl_id := Get_Parameter_List(pl_name);
              IF Id_Null(pl_id) THEN
                   -- if parameter lsit does not exist
                   -- create it
              pl_id := Create_Parameter_List(pl_name);
              IF Id_Null(pl_id) THEN
              Message('Error creating parameter list '||pl_name);
              RAISE Form_Trigger_Failure;
              END IF;
              ELSE
              Message('Parameter list '||pl_name||' already exists!');
              -- destroy it to clear old parameters
              -- and create it again;
              destroy_parameter_list(pl_id);
              pl_id := Create_Parameter_List(pl_name);
              END IF;
    Add_Parameter(pl_id,'p_customer_name',TEXT_PARAMETER,:customer.cust_name);
    -- add as many parameters as needed
    -- finally run the report passing your parameter list
         repid := FIND_REPORT_OBJECT('report4');
         v_rep := RUN_REPORT_OBJECT(repid, pl_id);
                   Exception
                        when others then
                        Message('Error running report. '||sqlerrm, acknowledge);
    END;
    Also, you need to create the parameter in your report:
    1.- Open your report on reports builder.
    2.- Find the "Data Model" node, and the "User parameters" node.
    3.- Create a parameter: p_customer_name
    4.- Modify your sql from:
    Select * from S_customer
    TO:
    Select * from S_customer
    where Customer_Name=:p_customer_name;
    If you want this parameter to be optional, check the reports online help on "Lexical References".
    Have fun,
    Hugo

Maybe you are looking for

  • Error Messages and iTunes

    I have been using iTunes for years, but have recently been encountering several problems since upgrading to a new tower. A computer geek friend of mine (his term, not mine)transferred everything from the old tower to the new one. I have no issues wit

  • Relation between GL Account and Invoice?

    Hi Experts, I am working with the FI reports for the first time and I do not have any idea on FI functional flow. I have some basic questions like What is the Relation between GL Account and Invoice? When will an Invoice be posted into BKPF, BSEG, BS

  • Can't change interest block at customer invoice

    Hi, I am trying to change the field interest indicator/block for an open customer item. I enter tcode FBL3N, choose customer and click on one of the open items. The form open and I choose change mode. I then choose alternative> additional data and th

  • CiscoWorks LMS 4.0.1, user tracking acquisition problem on 3750 stack.

    Hello. We are using Catalyst 3750 switch stacks with software 12.2(44)SE. We have two stacks, only one with IP routing enabled. When we try to run an Acquisition Action on this, from Admin> Collection Settings> User Tracking, the system replies with

  • IPhoto 9 library first aid really won't open

    I see others have posted this problem and the fixes worked for them...however I have tried deleting relevant plists and preferences as suggested by Old Toad and others on similar threads and i have opened the app while holding down command + option k