Solved

PB with Report Node !!!!

Posted on 2004-10-30
2,049 Views
Last Modified: 2008-01-09
Hello,

Under my REPORT node under Forms/Reports 9i, I have 2 nodes:
REPORT and BTPRTINV. My applications contains 10 different PROGRAM UNITS that are programmed to call 10 different reports.

1) Can I call 10 different reports from just 2 nodes ?

I noticed that my properties of the BTPRTINV node contains a hardcoded reference to one specific report file and path H:\ALCIE\Btprtinv.rep

2) Should I remove that hardcoded reference to access different reports ?

Your toughts...

PT
0
Question by:ptreves
    21 Comments
     
    LVL 22

    Expert Comment

    by:Henka
    1) You can use only one report object for calling reports.

    Here are properties of OUR_DUMMY_REPORT:
    Name = OUR_DUMMY_REPORT
    Execution Mode = Batch
    Communication Mode = Synchronous
    Report Destination Type = File

    In your code you must set all necessary properties programmatically, especially:

    report_id:= FIND_REPORT_OBJECT('OUR_DUMMY_REPORT');
    SET_REPORT_OBJECT_PROPERTY(report_id,REPORT_FILENAME,'your_report');

    2) remove it
    0
     

    Author Comment

    by:ptreves
    Hello,

    Here is an example of my code that uses the parameter list from Oracle 6i with the set_report_object_property function for the system parameters:
    -----
          pl_id := Create_parameter_list('TRANSACTION');

          add_parameter(pl_id,'PARAMFORM',TEXT_PARAMETER,'NO');
          --add_parameter(pl_id,'DESTYPE',TEXT_PARAMETER,'printer');
          --add_parameter(pl_id,'DESNAME',TEXT_PARAMETER,'Lexmark Upper Tray');
          add_parameter(pl_id,'COPIES',TEXT_PARAMETER,'1');
          add_parameter(pl_id,'P_PRINT_DATE',TEXT_PARAMETER,to_char(:variable.print_date));
          add_parameter(pl_id,'P_PROJECT',TEXT_PARAMETER,:variable.project);
          add_parameter(pl_id,'P_CO',TEXT_PARAMETER,:company.co);
                    add_parameter(pl_id,'P_SURVEYOR',TEXT_PARAMETER,nvl(to_char(:variable.surveyor),'0'));

           repid := find_report_object('BTPRTINV');
             set_report_object_property(repid, report_comm_mode, synchronous);
             set_report_object_property(repid, report_execution_mode, batch);
             set_report_object_property(repid, report_destype, cache);
             set_report_object_property(repid, report_desformat, 'HTMLCSS');
             ---set_report_object_property(repid, report_desname, 'PDF');
             --set_report_object_property(repid, report_desname, 'Lexmark Upper Tray');
             set_report_object_property(repid, report_server, 'RepSRV');
                
                   v_rep := run_report_object(repid, pl_id);

    ========
    The problem with this code, is that when it reaches the run_report_object function/procedure, it hangs.
    I tried tracing the code ,without success.
    1) Any ideas what could be causing this ??

    Also, I have an attached library called RP2RRO. I tried setting system parameters using built-in functions/procedures.
    However, at compile time those function to not compile. Here is the sample code:
      rp2rro.setdestype('PRINTER');
      rp2rro.setDesname('lxut');
      rp2rro.rp2rro_run_product(REPORTS,'btreppro.rep',SYNCHRONOUS,RUNTIME,FILESYSTEM,pl_id,null);

    2) How can I make sure that those function/procedure compile and work properly ?

    PT
    0
     

    Author Comment

    by:ptreves
    Hello again,

    3) Should I pass my custom parameters through my parameter list, or my set_report_object_property function ?
    4) Does it realy matter ?

    PT
    0
     
    LVL 22

    Accepted Solution

    by:
    Are you sure that your report server is installed properly ? Also while the attached library is not compiled then what else ?

    3) I would use SET_REPORT_OBJECT_PROPERTY function. Here is a sample code from Metalink:

    PROCEDURE TEST_REPORT IS
      repid      REPORT_OBJECT;
      v_rep      VARCHAR2(100);
      rep_status VARCHAR2(20);
    BEGIN
      repid := find_report_object('report5');
      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_DESFORMAT,'html');
      SET_REPORT_OBJECT_PROPERTY(repid,REPORT_SERVER,'repserver90');
      SET_REPORT_OBJECT_PROPERTY(repid,REPORT_OTHER,'paramform=no pdeptno='||:dept.deptno);
      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
        /*Display report in the browser*/
        WEB.SHOW_DOCUMENT('http://<YourServerName:8888/reports/rwservlet/getjobid'||
       substr(v_rep,instr(v_rep,'_',-1)+1)||'?'||'server=repserver90','_blank');
      ELSE
        message('Error when running report');
      END IF;
    END;
    0
     

    Author Comment

    by:ptreves
    Hello,

    I noticed in my Forms code that PARAMFORM=NO, however, the report behing called in the Report does contain a parameter form.

    1) Isn't this a contradiction ?
    2) What is the role of PARAMFORM at the Forms level ?

    PT
    0
     

    Author Comment

    by:ptreves
    Hello again,

    Is there any coding examples out there is a Form calling a Report over the web that uses a parameter form. I have read that I need to pass 3 additional parameters called : P_ACTION, P_USER_CONNECT and P_SERVERNAME.

    I have also read that I need to write some code in the BEFORE PARAM FORM trigger at the Report level that will substitute missing infomation in the HTML ACTION attribute.

    1) Any suggestions ?

    PT
    0
     
    LVL 22

    Expert Comment

    by:Henka
    Paramform=NO means that parameter form in the report is suppressed. So it seems like it have been a bug. I will try to find something on Metalink.
    0
     
    LVL 22

    Expert Comment

    by:Henka
    Here is one bug - 3324576:

    Problem statement:

    SRW.APPLY_DEFINITION IN PGM UNIT FAILS USING .REP FILE WITH REP-1457 ERROR

    *** 12/17/03 07:57 am ***

    DDR Bug Filing Template for filing Dev. Tools

    Problem description: ( should include the following )
    -------------------

    1. Clear description of the problem encountered: Report which contains

    SRW.ADD_DEFINITION and SRW.APPLY_DEFINITION in an internal program unit called from the BeforePForm trigger runs via rwservlet as a .rdf, but not as a .rep.
    The program unit in the test case contains the following XML customization:

    PROCEDURE apply_def IS

    BEGIN

    srw.add_definition('< ?xml version="1.0" encoding="UTF-8"?> < report

    name="xmltest" author="OSR Generated" DTDVersion="1.0">

    < customize>

    < object name="B_COL1" type="REP_GRAPHIC_TEXT">

    < properties>

    < property name="textSegment">

    < ![CDATA[Changed Label 4]]>

    < /property>

    < /properties>

    < /object>

    < /customize>

    .

    < /report>

    .

    ');

    srw.apply_definition;

    END;

    .

    The original value of B_COL1 is 'Changed Label 3', and changes to 'Changed Label 4' when the report is run from either the builder and rwservlet using the RDF, but fails when running the .REP (compiled) file with the rwservlet.

    2. Indication of the frequency and predictability of the problem: Always

    3. Sequence of events leading to the problem: Customer needs to call program units in a .PLL file, and one of them includes XML Customization. For simplicity, the testcase provided simply calls the program unit from the BeforePForm trigger. Customer had Oracle Consulting on site, but they identified this as something similar to bug:3163288, but do not think this is the same scenario (not using the customize= parameter from the rwservlet; rather, the XML code is an internal program unit).

    4. Technical impact on the customer. Include persistent after effects.

    Customer is not able to maintain the functionality they had in Reportds 6i and would need to

    5. Pertinent configuration information: No unusual configuration.

    Keywords:

    --------
    REP-1247; SRW.ADD_DEFINITION; SRW.APPLY_DEFINITION; XML; REP

    ...
    9iAS error:

    REP-1247: Report contains uncompiled PL/SQL.

    10g error:

    REP-1439: Cannot compile .REP or .PLX file as it does not have source

    Generic/Port-specific findings:
    ----------------------------------

    Did you test with the latest version?

    YES.

    Platform Client Server Ver. RDBMS Ver. Reproduced (yes/no)
    ------------ --------- ------------- ------------ -------------------

    Windows 2K Windows2K 9.0.2.3.0 9.2.0.4.0 yes

    Linux AS 2.1 Windows2K 9.0.2.3.0 9.2.0.4.0 yes

    Linux AS 3.0 Windows2K 9.0.4.0.0 9.2.0.4.0 yes


    Available workarounds:
    ---------------------

    use the customize= parameter in the RDF and compile the .rep. Not acceptable solution for customer. They need to refer to the custom XML tags in an external program unit..

    Related bugs:
    ------------
    Did you search for duplicate bugs?.

    YES.

    bug 3163288, but do not think this is the same scenario (not using the customize= parameter from the rwservlet; rather, the XML code is an internal program unit)..

    Additional information:
    ----------------------

    Customer needs to use program unit for XML customization, not an external .xml file.
    0
     

    Author Comment

    by:ptreves
    Hello,

    That metalink document looks pretty complicated.
    Bottom line, with PARAMFORM=NO at the form level, when invoking my report from a form over the web (i.e., WebForm calling WebReport), will a parameter form be displayed ?

    I know that the parameter form appears when I run my report in a stand alone mode.

    PT

    PS: To run my report over the web with Oracle 9i, do I need to set 3 user parameters such as P_ACTION, P_USER_CONNECT, P_SERVERNAME ? Should I also include some HTML substitution code in the Before PForm trigger at the Report Level ?
    0
     
    LVL 22

    Expert Comment

    by:Henka
    If PARAMFORM=NO then the parameter form will not be displayed. But if the report server is not configured properly then parameter form can be displayed. In my work there have been such situation.
    I don't know about parameters P_ACTION, P_USER_CONNECT, P_SERVERNAME;you can try to pass it and you will see what happens.
    About including HTML code in the before-parameter-form trigger: I have not done it. What is that code for ?
    0
     

    Author Comment

    by:ptreves
    Hello,

    The HTML code, is used to account for an empty ACTION string in the FORM when iinvoking a Parameter form for a Report over the Web.

    I created a test report with 3 new user parameters, P_ACTION, P_USER_CONNECT and P_SERVERNAME on the Report side.

    On the Forms side, I set those parameters together with 3or 4 other user parameters (i.e., custom parameters). How can I be sure that the application is configured correctly. ??

    1) When I run my application in DEBUG mode, I noticed that the application hangs at the RUN_REPORT_OBJECT instruction, after having set all my system/user parameters.

    My report server is RepSRV, and through the debugger, the value returned from RUN_REPORT_OBJECT after hanging is RepSRV_0 and my report status is a blank string of no value.

    Any ideas what could be the problem ?

    PT

    PS: I check that my report node exists and references a source report file correctly in a subfolder.

    PS2: In the REPORT_OTHER clause, should the parameters be specified in any special order ?


    0
     
    LVL 22

    Expert Comment

    by:Henka
    1) There is a manual on OTN for configurating Forms and reports on WEB there. Oracle provides some test forms/reports so you can try it. There are also some BUGs there.

    PS2 - as I know they shouldn't
    0
     
    LVL 22

    Expert Comment

    by:Henka
    0
     
    LVL 22

    Expert Comment

    by:Henka
    Here is something similar: bug 3831282 - a workaround is using *.RDF format:

    Abstract: XML REPORT HANGS IN 10GAS ON UNIX

    Problem description:

    A report is saved in xml format with extension xml.

    A reports server is configured with jvmOptions as follows:

    ./rwserver.sh server=test2 jvmOptions="-server -Xms512m -Xmx512m -Xss128k"&


    Running this report on 10gAS on Linux, it hangs.

    There is no problem on MS Windows, only on Linux and Solaris (and other UNIX most likely).

    There is no problem in 9iAS or 9iDS.

    There is no problem in 10gDS.

    The problem only occurs in 10gAS.

    On Linux, the report hangs / no response.

    On Solaris, rwEng-0 crashes.

    Opening the report in the builder and saving it in rdf format, the problem is gone.
    ...

    Available workarounds:
    Use .rdf format.

    ./rwserver.sh server=test2 jvmOptions="-server -Xms512m -Xmx512m -Xss256k"&
    0
     
    LVL 22

    Expert Comment

    by:Henka
    RepSRV_0 - it is minEngine - see this example

    server.conf:

    engine id="rwEng" class="oracle.reports.engine.EngineImpl"

    initEngine="1" maxEngine="1" minEngine="0" engLife="50"

    maxIdle="30" callbackTimeOut="60000"
    0
     
    LVL 22

    Expert Comment

    by:Henka
    Workaround for BARCODE REPORT is including oraclebarcode.jar into the server's classpath:

     < engine id="rwEng" class="oracle.reports.engine.EngineImpl"

    initEngine="1" maxEngine="1" minEngine="0" engLife="50"

    maxIdle="30" callbackTimeOut="60000"

    classPath="/home/manish/oraclebarcode.jar">
    0
     

    Author Comment

    by:ptreves
    Hello,

    I know it has been some time..............

    I installed just the Forms/Reports Services 10g on my Linux Red Hat Enterprise 3 (ES) server.
    Does this bug apply in my case ?

    PT
    0
     

    Author Comment

    by:ptreves
    Hello,

    I have some issues with only 1 Paper Parameter Form Field appearing over the Web on the corresponding Parameter Form. All other Paper Parameter Form fields do not appear on the Client Web Browser. I tried increasing the Web Cache through the Application Server Control, but did not resolve the issue. Tried increasing the CACHESIZE and REPORTS_CLASSPATH variables.

    IS this problem related to the mentionned bug or is there an adjustment missing under Forms/Reprots Services 10g ?

    PT

    PS: The same Parameter Form/WebReports works fine under Windows XP Pro Oracle 9i iDS (9.0.2.0.1).
    0
     
    LVL 22

    Expert Comment

    by:Henka
    YES - bug 3831282:XML REPORT HANGS IN 10GAS ON UNIX

    Running this report on 10gAS on Linux, it hangs.

    .

    There is no problem on MS Windows, only on Linux and Solaris (and other UNIX most likely).

    There is no problem in 9iAS or 9iDS.

    There is no problem in 10gDS.

    The problem only occurs in 10gAS.

    .

    On Linux, the report hangs / no response.
    0
     

    Author Comment

    by:ptreves
    Hello,

    Thanks for your tips.
    I reinstalled iAS Forms/Reports 10g with the Upgraded JVM 1.4.2.2 (isntead of JVM 1.3.1). This resolved my issue with the missing fields under the Web Parameter Forms.

    However, I cannot invoke my WebReports from WebForms through the Web Parameter Form ?

    1) Any ideas ?

    PT
    0
     
    LVL 22

    Expert Comment

    by:Henka
    I have no ideas, it seems that you must wait for resolving bug 3831282 by Oracle.
    0

    Write Comment

    Please enter a first name

    Please enter a last name

    We will never share this with anyone.

    Featured Post

    Top 6 Sources for Identifying Threat Actor TTPs

    Understanding your enemy is essential. These six sources will help you identify the most popular threat actor tactics, techniques, and procedures (TTPs).

    Working with Network Access Control Lists in Oracle 11g (part 1) Part 2: http://www.e-e.com/A_9074.html So, you upgraded to a shiny new 11g database and all of a sudden every program that used UTL_MAIL, UTL_SMTP, UTL_TCP, UTL_HTTP or any oth…
    How to Create User-Defined Aggregates in Oracle Before we begin creating these things, what are user-defined aggregates?  They are a feature introduced in Oracle 9i that allows a developer to create his or her own functions like "SUM", "AVG", and…
    This video explains at a high level with the mandatory Oracle Memory processes are as well as touching on some of the more common optional ones.
    This videos aims to give the viewer a basic demonstration of how a user can query current session information by using the SYS_CONTEXT function

    846 members asked questions and received personalized solutions in the past 7 days.

    Join the community of 500,000 technology professionals and ask your questions.

    Join & Ask a Question

    Need Help in Real-Time?

    Connect with top rated Experts

    7 Experts available now in Live!

    Get 1:1 Help Now