Interactive Report with PL/SQL Function Source

Is it possible to create interactive report with PL/SQL function source returing a query? If not, has anyone done any work to simulate the interactive reporting feature for a normal report using API?

I haven't tried that before but you could:
1. create a collection from your result set returned by a dynamic query,
2. create a view on that collection,
3. use the view in your interactive report.
The usability of this proposal depends from a question how "dynamic" your query is - does it always have the same number of columns or not.
Denes Kubicek
http://deneskubicek.blogspot.com/
http://www.opal-consulting.de/training
http://apex.oracle.com/pls/otn/f?p=31517:1
-------------------------------------------------------------------

Similar Messages

  • Interactive report from PL/SQL function

    Hello All,
    i have a pl/sql function that dynamically builds up a sql query and returns it as a varchar2.
    when i create a new report then i can use this function in the report like
    return f_function(param1,param2,v('APP_ID'), v('APP_SESSION'));
    and this works fine.
    Except i cannot create an interactive report for this function, because it is not allowed !!!!
    So how can i use the function in an interactive report ?
    Thanks in advance,
    Marco

    Marco,
    Another rather extreme approach would be to go all the way and make your function pipelined (that is not only build but also execute the query) and then select from it in your interactive report.
    The disadvantage here would be that any supplementary filtering would act on the result set of the function (not as an addition to the where clause of the original query). But if you can live with that...
    The advantage would be that there's less fiddling with column headers.
    Regards,
    Iulian

  • Interactive Reports and PL/SQL Functions

    Hi,
    Am new to the interactive reports, and it appears to be I can only use a single SELECT statement to populate the report.
    I need to convert some older reports to the new interactive reports, but these are populated using PL/SQL functions, as the WHERE clause is built up depending on the selection of items on the web page.
    How can I replicate this with the new interactive reports? Have used CASE statements within a SELECT statement before, can I also use these in a WHERE clause as well?
    Regards
    Simon

    To my knowledge, currently the only way to use Interactive Reports is on a static query. And unfortunately you can't use CASE statements in the WHERE clause of a query, only in the select list.
    The way I would (and have) attacked this is to:
    1. Write the base static query as the basis of the interactive report
    2. Access the interactive report in while logged in as a developer
    3. Build a filter (or set of filters) and save the report. You have the choice of saving it as a named report or as the default report.
    This gives the user one to many filter sets they can use as a starting point and tweak, and gives them examples as to how they can and should use the interactive filtering.
    Doug

  • Interactive Report with multiple SQL

    I have an Interactive report that currently show info from 1 query. I want to be able to include info from another query on the report (like a master detail).
    I see it mentioned on the New features that it can now support multiple SQL's. How do you do it?

    Bob,
    Interactive Reports only support 1 query. You can write your query to pull data from multiple tables but only have one query. The new feature you are recalling is the 'Report Queries' now support multiple queries. Report Queries are under Shared Components and are used for custom pdf, excel, etc. printing - different feature.
    -- Sharon

  • Report with pl-sql function body returning sql query

    Hi
    using apex 4.0
    I have a requirement to create a report like cross tab and i have followed link "http://forums.oracle.com/forums/thread.jspa?threadID=697760".
    written below code in region source.
    declare
    q varchar2(4000);
    begin
    q := pk_pivot.pivotsql('select * from emp','deptno','empno,ename');
    return q;
    end;
    when running report it gives "web page can not found -HTTP 404 NOT FOUND" .
    Please help to sove this error.
    Thanks in advance

    Hi,
    I get the same error.. If you have a solution, could you share it ??
    Thanks,
    Poru

  • Create a report with PL/SQL

    Hi,
    I have two pages: the first page contains two text fields and a submit button. In the first text field you can enter a name and in the second field you can enter a number. That means you can search a record by name or by number.
    In the second page the report is generated depending on the used text field of the first page.
    I tried to to define a region source code with PL/SQL for the report, but nothing appears on the report page although the record I was looking for exists in the database.
    begin
    if :ENTERNAME IS NOT NULL then
    FOR item IN (select "TB_PERSON_INSTITUTION"."PI_ID" as "PI_ID",
    "TB_PERSON_INSTITUTION"."PI_NAME" as "PI_NAME",
    "TB_PERSON_INSTITUTION"."PI_VORNAME" as "PI_VORNAME",
    from     "TB_PERSON_INSTITUTION" "TB_PERSON_INSTITUTION"
    where      upper("TB_PERSON_INSTITUTION"."PI_NAME") like upper(:ENTERNAME||'%'))
    loop
    DBMS_OUTPUT.PUT_LINE('First name = ' || item.PI_NAME ||
    ', Last name = ' || item.PI_VORNAME);
    end loop;
    end if;
    end;
    Regards
    Mark

    Hi,
    ok thanks. I tried to use the SQL-Report with type "SQL Query (PL/SQL function body returning SQL-Query)" and made a few changes in the SQL-Statement so that a second table is also included:
    declare My_select varchar2(500);
    begin
    if :TEXTEINGABENAME IS NOT NULL then
    My_select:='SELECT
    "TB_ADRESSE"."A_PLZ" "A_PLZ",
    "TB_ADRESSE"."A_ORT" "A_ORT",
    "TB_ADRESSE"."A_ID" "A_ID",
    "TB_PERSON_INSTITUTION"."PI_MITGLIEDSNUMMER" "PI_MITGLIEDSNUMMER",
    "TB_PERSON_INSTITUTION"."PI_NAME" "PI_NAME",
    "TB_PERSON_INSTITUTION"."PI_VORNAME" "PI_VORNAME",
    "TB_PERSON_INSTITUTION"."PI_ERGAENZUNG" "PI_ERGAENZUNG",
    "TB_PERSON_INSTITUTION"."PI_ERGAENZUNG1" "PI_ERGAENZUNG1",
    "TB_PERSON_INSTITUTION"."PI_ID" "PI_ID"
    FROM
    "TB_ADRESSE" "TB_ADRESSE",
    "TB_PERSON_INSTITUTION" "TB_PERSON_INSTITUTION"
    WHERE "TB_PERSON_INSTITUTION"."PI_ID" = "TB_ADRESSE"."A_F_PERSON_INSTITUTION"
    AND upper("TB_PERSON_INSTITUTION"."PI_NAME") like upper(:TEXTEINGABENAME||"%")';
    else
    if :TEXTMITGLIEDSNUMMER is not null then
    My_select:='SELECT
    "TB_ADRESSE"."A_PLZ" "A_PLZ",
    "TB_ADRESSE"."A_ORT" "A_ORT",
    "TB_ADRESSE"."A_ID" "A_ID",
    "TB_PERSON_INSTITUTION"."PI_MITGLIEDSNUMMER" "PI_MITGLIEDSNUMMER",
    "TB_PERSON_INSTITUTION"."PI_NAME" "PI_NAME",
    "TB_PERSON_INSTITUTION"."PI_VORNAME" "PI_VORNAME",
    "TB_PERSON_INSTITUTION"."PI_ERGAENZUNG" "PI_ERGAENZUNG",
    "TB_PERSON_INSTITUTION"."PI_ERGAENZUNG1" "PI_ERGAENZUNG1",
    "TB_PERSON_INSTITUTION"."PI_ID" "PI_ID"
    FROM
    "TB_ADRESSE" "TB_ADRESSE",
    "TB_PERSON_INSTITUTION" "TB_PERSON_INSTITUTION"
    WHERE "TB_PERSON_INSTITUTION"."PI_ID" = "TB_ADRESSE"."A_F_PERSON_INSTITUTION"
    AND upper("TB_PERSON_INSTITUTION"."PI_MITGLIEDSNUMMER") like upper(:TEXTMITGLIEDSNUMMER||"%")';
    end if;
    end if;
    return My_select;
    end;
    When I try to apply changes an error message occurs:
    "Query cannot be parsed within the Builder. If you believe your query is syntactically correct, check the ''generic columns'' checkbox below the region source to proceed without parsing. The query can not be parsed, the cursor is not yet open or a function returning a SQL query returned without a value."
    Regards,
    Mark

  • Interactive Report with Null Columns

    I've got a user who wants to export an interactive report, and he needs certain columns to appear on the export for him to fill the data in later (this is an intermediate step, while we work on getting all the data he needs in to the database). I've created the report query, and there are a handful of null/empty columns (to preserve the correct order for the export). When I try to add this query to APEX in an interactive report, I get a "ORA-00001: unique constraint (APEX_040000.WWV_FLOW_WORKSHEET_COLUMNS_UK2) violated" error.
    Googling around shows me that this happens because of similarly-named columns, and the solution is to provide aliases to all columns. My report has aliases on all columns, but I still cannot create an interactive report. I've tried changing the null columns to empty strings, as well as enclosing the aliases in double-quotes, but nothing works. I can however use my original query to create a standard report, but due to the export requirement, this isn't ideal.
    I was able to create the interactive report with one null column, and then edited the report source to add in the others. This had to be done one at a time, since trying to add multiple null columns at the same time gives the same error again. Unfortunately, when I try and run the page, I get an "ORA-20001: get_dbms_sql_cursor error ORA-00918: column ambiguously defined" error.
    My original query:
    select customer.customer_name as customer,
           project.name as project_name,       
           trunc(project.estimated_end_dt) as due_date,
           project_status.project_status_desc as status,
           null as revenue,
           project.baseline_effort as baseline_hours,
           null as projected_cost,
           null as est_gain_loss,
           project.actual_hours as actual_hours,
           project.estimated_hours as projected_hours,
           null as projected_cost,
           null as projected_gain_loss,
           null as roi      
        from project,
             customer
      where customer.customer_id = project.customer_id
      and project.inactive_ind = 0
      and project.customer_id is not null
      and project.estimated_end_dt >= :DTP_P50_STARTDT
      and project.estimated_end_dt <= :DTP_P50_ENDDT
    order by customer.customer_name,
             project.estimated_end_dt;             Can someone tell me a way to create an interactive report with multiple null columns?

    Hi shimmoril,
    The problem is likely that you have two columns aliased as "projected_cost" (7th column and 11th column).
    Hope this helps,
    John
    If you find this information useful, please mark the post "helpful" or "correct" so that others may benefit as well.*

  • Interactive Report with union all in the query

    I have an interactive report with the following query in the report region:
    select property,saddr1,upostdate,sotherdate1,journal_control-1000000000,account,sdesc,uref,
    suserdefined1,trans_notes,samount,detail_notes
    from journal_entries
    union all
    select property,saddr1,upostdate,sotherdate1,journal_control-700000000,account,sdesc,uref,
    suserdefined1,trans_notes,stotalamount,detail_notes
    from charge_entries;
    This gets translated as listed below during runtime. I am trying to pass a value to both SELECT statements instead of the just the bottom select statement. Is this possible using interactive reports.
    select
    PROPERTY,
    SADDR1,
    UPOSTDATE,
    SOTHERDATE1,
    ACCOUNT,
    SDESC,
    UREF,
    SUSERDEFINED1,
    TRANS_NOTES,
    SAMOUNT,
    DETAIL_NOTES,
    "JOURNAL_CONTROL-1000000000" "JOURNAL_CONTROL-1000000000"
    from (
    select property,saddr1,upostdate,sotherdate1,journal_control-1000000000,account,sdesc,uref,
    suserdefined1,trans_notes,samount,detail_notes
    from journal_entries
    union all
    select property,saddr1,upostdate,sotherdate1,journal_control-700000000,account,sdesc,uref,
    suserdefined1,trans_notes,stotalamount,detail_notes
    from charge_entries
    ) r
    where ("PROPERTY" = :APXWS_EXPR_1)
    0.14: IR binding: ":APXWS_EXPR_1"="APXWS_EXPR_1" value="prop1"
    Thanks for any help,
    Jim

    The bottom query is actually the third query, it encompasses the two that are unioned. It is generated by APEX to allow for the search facility - to achieve what you want ignore the larger query, and get your query working in something like SQL developer. Once it's working then put it into APEX, and the search wrapper will be generated.
    select property,saddr1,upostdate,sotherdate1,journal_control-1000000000,account,sdesc,uref,
    suserdefined1,trans_notes,samount,detail_notes
    from journal_entries
    where property = :YOUR_CRITERIA
    union all
    select property,saddr1,upostdate,sotherdate1,journal_control-700000000,account,sdesc,uref,
    suserdefined1,trans_notes,stotalamount,detail_notes
    from charge_entries
    where property = :YOUR_CRITERIA;
    Then you need to think about how you are using the report, if it is linked to from another report, then create a hidden variable and pass it from the parent.
    If the report is standalone , then you could create an item , that can be edited and when submitted, re-executes the report based on the criteria entered.
    Steve
    Hot and bothered in sunny Dubai

  • Interactive reports with alv

    Hi,
    i just wanted to know how to create interactive reports with check box and whether we can use av with interactive reports.

    hi,
    this the code for interactiv ALV
    *& Report  ZINT_ALV
    REPORT  zint_alv.
    TYPE-POOLS:slis.
    TABLES:mara,
           makt,
           mseg.
    DATA:BEGIN OF itab OCCURS 0,
          matnr LIKE mara-matnr,
          maktx LIKE makt-maktx,
         END OF itab.
    DATA:BEGIN OF itab1 OCCURS 0,
          mblnr LIKE mseg-mblnr,
          menge LIKE mseg-menge,
          meins LIKE mseg-meins,
          werks LIKE mseg-werks,
         END OF itab1.
    DATA:BEGIN OF itab2 OCCURS 0,
          mblnr LIKE mseg-mblnr,
          budat LIKE mkpf-budat,
         END OF itab2.
    DATA:fcat TYPE slis_t_fieldcat_alv,
         fcat1 TYPE slis_t_fieldcat_alv,
         fcat2 TYPE slis_t_fieldcat_alv,
         eve TYPE slis_t_event,
         eve1 TYPE slis_t_event.
    DATA:t_mat LIKE mara-matnr,
         t_doc LIKE mseg-mblnr,
         s_mat LIKE mara-matnr,
         g_repid LIKE sy-repid,
         subtot TYPE slis_t_sortinfo_alv,
         g_subtot LIKE LINE OF subtot.
    SELECTION-SCREEN:BEGIN OF BLOCK blk1 WITH FRAME TITLE text-001.
    SELECT-OPTIONS:mat FOR mara-matnr OBLIGATORY.
    SELECTION-SCREEN:END OF BLOCK blk1.
    INITIALIZATION.
      PERFORM build_fcat USING fcat.
      PERFORM build_eve.
    START-OF-SELECTION.
      PERFORM get_data.
      PERFORM dis_data.
    *&      Form  build_fcat
          text
         -->T_FCAT     text
    FORM build_fcat USING t_fcat TYPE slis_t_fieldcat_alv.
      DATA:wa_fcat TYPE slis_fieldcat_alv.
      wa_fcat-tabname = 'ITAB'.
      wa_fcat-fieldname = 'MATNR'.
      wa_fcat-ref_fieldname = 'MATNR'.
      wa_fcat-ref_tabname = 'MARA'.
      wa_fcat-seltext_m = 'Material'.
    wa_fcat-input = ' '.
    wa_fcat-edit = 'X'.
      wa_fcat-input = 'X'.
    wa_fcat-key = 'X'.
      APPEND wa_fcat TO t_fcat.
      CLEAR wa_fcat.
      wa_fcat-tabname = 'ITAB'.
      wa_fcat-fieldname = 'MAKTX'.
      wa_fcat-seltext_m = 'Description'.
      APPEND wa_fcat TO t_fcat.
      CLEAR wa_fcat.
    ENDFORM.                    "build_fcat
    *&      Form  build_eve
          text
    FORM build_eve.
      DATA:t_eve TYPE slis_alv_event.
      CALL FUNCTION 'REUSE_ALV_EVENTS_GET'
       EXPORTING
         i_list_type           = 0
       IMPORTING
         et_events             = eve
    EXCEPTIONS
      LIST_TYPE_WRONG       = 1
      OTHERS                = 2
      IF sy-subrc <> 0.
    MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
            WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
      ENDIF.
    ENDFORM.                    "build_eve
    *&      Form  get_data
          text
    FORM get_data.
      SELECT maramatnr maktmaktx INTO CORRESPONDING FIELDS OF TABLE itab
      FROM mara INNER JOIN makt
      ON maramatnr = maktmatnr
      WHERE mara~matnr IN mat.
    ENDFORM.                    "get_data
    *&      Form  dis_data
          text
    FORM dis_data.
      g_repid = sy-repid.
      CALL FUNCTION 'REUSE_ALV_GRID_DISPLAY'
       EXPORTING
         i_callback_program                = g_repid         "'ZINT_ALV'
         i_callback_user_command           = 'USER_COMMAND'
         i_grid_title                      = 'Interactive ALV'
         it_fieldcat                       = fcat
         it_events                         = eve
        TABLES
          t_outtab                          = itab
    EXCEPTIONS
      PROGRAM_ERROR                     = 1
      OTHERS                            = 2
      IF sy-subrc <> 0.
    MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
            WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
      ENDIF.
    ENDFORM.                    "dis_data
    *&      Form  user_command
          text
         -->U_COM      text
    FORM user_command USING u_com LIKE sy-ucomm sel_field TYPE slis_selfield.
      CLEAR fcat1.
      CASE u_com.
        WHEN '&IC1'.
          READ TABLE itab INDEX sel_field-tabindex.
          IF sel_field-fieldname = 'MATNR'.
            IF sy-subrc = 0.
              t_mat = itab-matnr.
              PERFORM build_cat1 USING fcat1.
              PERFORM build_eve1.
              PERFORM get_data1.
              PERFORM dis_data1.
            ENDIF.
          ENDIF.
         SET PARAMETER ID 'MAT' FIELD t_mat.
         CALL TRANSACTION 'MM03' AND SKIP FIRST SCREEN.
      ENDCASE.
    ENDFORM.                    "user_command
    *&      Form  build_fcat1
          text
         -->T_FCAT1    text
    FORM build_cat1 USING t_fcat1 TYPE slis_t_fieldcat_alv.
      DATA:wa_fcat1 TYPE slis_fieldcat_alv.
      wa_fcat1-tabname = 'ITAB1'.
      wa_fcat1-fieldname = 'MBLNR'.
      wa_fcat1-seltext_m = 'Material Doc.'.
      APPEND wa_fcat1 TO t_fcat1.
      CLEAR wa_fcat1.
      wa_fcat1-tabname = 'ITAB1'.
      wa_fcat1-fieldname = 'MENGE'.
      wa_fcat1-seltext_m = 'Quantity'.
      wa_fcat1-do_sum    = 'X'.
      APPEND wa_fcat1 TO t_fcat1.
      CLEAR wa_fcat1.
      wa_fcat1-tabname = 'ITAB1'.
      wa_fcat1-fieldname = 'MEINS'.
      wa_fcat1-seltext_m = 'UOM'.
      APPEND wa_fcat1 TO t_fcat1.
      CLEAR wa_fcat1.
      wa_fcat1-tabname = 'ITAB1'.
      wa_fcat1-fieldname = 'WERKS'.
      wa_fcat1-seltext_m = 'Plant'.
      APPEND wa_fcat1 TO t_fcat1.
      CLEAR wa_fcat1.
    g_subtot-spos = 1.
    g_subtot-fieldname = 'MBLNR'.
    g_subtot-tabname = 'ITAB1'.
    g_subtot-up = 'X'.
    g_subtot-group = 'X'.
    g_subtot-subtot = 'X'.
    g_subtot-expa = 'X'.
    APPEND g_subtot TO subtot.
    g_subtot-spos = 2.
    g_subtot-fieldname = 'MENGE'.
    g_subtot-tabname = 'ITAB1'.
    g_subtot-up = 'X'.
    g_subtot-group = 'X'.
    g_subtot-subtot = 'X'.
    g_subtot-expa = 'X'.
    APPEND g_subtot TO subtot.
    ENDFORM.                    "build_fcat1
    *&      Form  build_eve1
          text
    FORM build_eve1.
      CALL FUNCTION 'REUSE_ALV_EVENTS_GET'
        EXPORTING
          i_list_type     = 0
        IMPORTING
          et_events       = eve1
        EXCEPTIONS
          list_type_wrong = 1
          OTHERS          = 2.
      IF sy-subrc <> 0.
    MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
            WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
      ENDIF.
    ENDFORM.                                                    "build_eve1
    *&      Form  get_data1
          text
    FORM get_data1.
      SELECT mblnr menge meins werks FROM mseg
      INTO CORRESPONDING FIELDS OF TABLE itab1
      WHERE matnr = t_mat.
    ENDFORM.                                                    "get_data1
    *&      Form  dis_data1
          text
    FORM dis_data1.
      g_repid = sy-repid.
      CALL FUNCTION 'REUSE_ALV_GRID_DISPLAY'
       EXPORTING
         i_callback_program                = g_repid              "'ZINT_ALV'
         i_callback_user_command           = 'USER_COMMAND1'
         it_fieldcat                       = fcat1
         it_events                         = eve1
         i_save                            = 'A'
         it_sort                            = subtot
        TABLES
          t_outtab                          = itab1
    EXCEPTIONS
      PROGRAM_ERROR                     = 1
      OTHERS                            = 2
      IF sy-subrc <> 0.
    MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
            WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
      ENDIF.
    ENDFORM.                                                    "dis_data1
    *&      Form  user_command1
          text
         -->U_COM1     text
         -->SEL_FIELD  text
    FORM user_command1 USING u_com1 LIKE sy-ucomm sel_field TYPE slis_selfield.
      CASE u_com1.
        WHEN '&IC1'.
          READ TABLE itab1 INDEX sel_field-tabindex.
          IF sy-subrc = 0.
            t_doc = itab1-mblnr.
            PERFORM build_cat2 USING fcat2.
            PERFORM get_data2.
            PERFORM dis_data2.
          ENDIF.
      ENDCASE.
    ENDFORM.                    "user_command
    *&      Form  build_cat2
          text
         -->P_FCAT1  text
    FORM build_cat2  USING    t_fcat2 TYPE slis_t_fieldcat_alv.
      DATA:wa_fcat2 TYPE slis_fieldcat_alv.
      wa_fcat2-tabname = 'ITAB2'.
      wa_fcat2-fieldname = 'MBLNR'.
      wa_fcat2-seltext_m = 'Material Doc.'.
      APPEND  wa_fcat2 TO t_fcat2.
      CLEAR  wa_fcat2.
      wa_fcat2-tabname = 'ITAB2'.
      wa_fcat2-fieldname = 'BUDAT'.
      wa_fcat2-seltext_m = 'Material Date'.
      APPEND  wa_fcat2 TO t_fcat2.
      CLEAR  wa_fcat2.
    ENDFORM.                    " build_cat2
    *&      Form  get_data2
          text
    -->  p1        text
    <--  p2        text
    FORM get_data2 .
      SELECT mblnr budat  FROM mkpf
        INTO CORRESPONDING FIELDS OF TABLE itab2
        WHERE mblnr = t_doc.
    ENDFORM.                                                    " get_data2
    *&      Form  dis_data2
          text
    -->  p1        text
    <--  p2        text
    FORM dis_data2 .
      g_repid = sy-repid.
      CALL FUNCTION 'REUSE_ALV_GRID_DISPLAY'
       EXPORTING
         i_callback_program                = g_repid              "'ZINT_ALV'
         it_fieldcat                       = fcat2
         i_save                            = 'A'
        TABLES
          t_outtab                          = itab2
    EXCEPTIONS
      PROGRAM_ERROR                     = 1
      OTHERS                            = 2
      IF sy-subrc <> 0.
    MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
            WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
      ENDIF.
    ENDFORM.                                                    " dis_data2
    reward if useful...

  • XML Publisher Report with PL/SQL

    Hi
    Like to know how to develop the XML Publisher Report with PL/SQL, i did the following
    1. created a pkg like as below
    CREATE OR REPLACE PACKAGE BODY APPS.TEST_XMLTAG_PKG AS
    PROCEDURE main (errbuf OUT VARCHAR2,
    retcode OUT NUMBER
    ) IS
    BEGIN
    DECLARE
    ctx DBMS_XMLGEN.ctxHandle;
    xml CLOB;
    BEGIN
    ctx := dbms_xmlgen.newcontext('select * from scott.emp');
    dbms_xmlgen.setrowtag(ctx, 'MY-ROW-START-HERE');
    xml := dbms_xmlgen.getxml(ctx);
    dbms_output.put_line(xml);
    Fnd_file.put_line (fnd_file.LOG, XML);
    END;
    END;
    END TEST_XMLTAG_PKG;
    this pkg produces the output with xml tag in the view log.
    I have registered the conc program & xml rtf but it does not produce the output in PDF, , I am not able to get the xml tag when i click the Diagnostics --> View XML.
    can you please let me know the next steps involved.
    Regards
    Yram

    I think the problem is because there is no begin and end tag. save the xml from the logfile and open with xml editor or IE.. then you will see the problem.
    add Begin and end tag...then you should be fine.. i.e
    fnd_file.put_line(fnd_file.output,'<EMP_DATA>'); -- begin Tag
    tx := dbms_xmlgen.newcontext('select * from scott.emp');
    dbms_xmlgen.setrowtag(ctx, 'MY-ROW-START-HERE');
    xml := dbms_xmlgen.getxml(ctx);
    dbms_output.put_line(xml);
    Fnd_file.put_line (fnd_file.LOG, XML);
    fnd_file.put_line(fnd_file.output,'</EMP_DATA>'); -- End Tag
    Hope this helps..>Good Luck
    Ravi

  • MCTS 70-466 Implementing Data Models and Reports with Microsoft SQL Server 2012

    I am searching for training kit for Exam 70-466 (Implementing Data Models and Reports with Microsoft SQL Server 2012) but I think is not published yet. I was expecting its release in Jan or Feb 2014. Would any one can tell me its release date or any place
    where I can find this book.
    Thanks
     

    Hi Azhar lqbal Gondal,
    According to your description, since the issue regards training and certification,
     I suggest you post the question in the Learning forums at
    http://social.technet.microsoft.com/Forums/en-US/home?category=learning. It is appropriate and more experts will assist you. If you have a specific technical question about Microsoft SQL Server,
     you can visit and post your question on  the SQL Server Forum.
    There is some detail about Exam 70-466 Implementing Data Models and Reports with Microsoft SQL Server 2012, you can review the following articles.
    Exam content can be found here:
    http://www.microsoft.com/learning/en-us/exam-70-466.aspx
    http://borntolearn.mslearn.net/certification/database/w/wiki/525.466-implementing-data-models-and-reports-with-microsoft-sql-server-2012.aspx#fbid=Mn-t6aRhs-H
    Regards,
    Sofiya Li
    Sofiya Li
    TechNet Community Support

  • Any tool to search Crystal Reports with embedded SQL

    We have hundreds of Crystal Reports with embedded sql statements which have been developed over the years.  Is there any tool which will allow us to scan all of the reports to see which ones might use a certain table, or is using a "group by" clause, or whatever ?
    We'd prefer to not have to open each report to view the embedded sql.
    Any thing that will extract the sql for us and dump it to a file ??
    We have the reports as regular disk files, but they are also published to our Business Objects Enterprise XI R2 system (just an fyi in case there's an option on that side).

    Hi Wayne
    There is a sample ras sdk code here that might be if use to you
    Link: [https://www.sdn.sap.com/irj/boc/index?rid=/library/uuid/402f2b94-da66-2b10-c598-de0d4b6058dc]

  • Can i have a sample BSP INTERACTIVE Reports with step by step.

    Hi Friends,
    Can i have a sample BSP INTERACTIVE Reports with step by step.
    Moosa

    Hello,
    Please find the sample Code below.
    FIRST PAGE
    Layout Code.
    <htmlb:label for="emp" text="Employee id" width="10"/>
          <htmlb:inputField id="emp"  value="<%= w_input1%>"/>
          <p>
    <htmlb:label for="Employee Details"/>
           <htmlb:button   id = 'get'
                           text = 'Display'
                           on Click = 'OnInput Processing' />   <p>
    <h1>Employee Details</h1>
    <htmlb:tableView id="Employee"
                     table="<%= ZTABLE%>"  <- Give the table name
                     selectionMode = "lineEdit"
                     design="ALTERNATING">
    ONINITILIZATION EVENT.
    data:
      fs_yhtable like line of TABLE.
        select * from yhtable into table ZTABLE.
    ONINPUT PROCESSING CODE:
    * event handler for checking and processing user input and
    * for defining navigation
    class cl_htmlb_manager definition load.
    case event_id.
      when cl_htmlb_manager=>event_id.
      data: event  type ref to if_htmlb_data,
            fs_yhtable like line of t_yh1205,
            selrow type ref to cl_htmlb_tableview.
      event = cl_htmlb_manager=>get_event_ex( request ).
      selrow ?= cl_htmlb_manager=>get_data( request = request
                                            name    = 'tableView'
                                            id      = 'Employee' ).
      data: tv_data type ref to cl_htmlb_event_tableview,
             t_tab type int4_table.
    *        tv_data1 type ref to cl_htmlb_event_tableview.
      tv_data = selrow->data.
       t_tab = selrow->selectedrowindextable.
      if  event is not initial
      and event->event_name = 'tableView'.
        w_int = tv_data->rowselection.
        navigation->set_parameter( 'Employee' ).
        navigation->set_parameter( name = 'w_int'
                                   value = w_int ).
        navigation->set_parameter( name = 'table'
                                   value = table ).
        navigation->goto_page( 'second.htm' ).
      endif.
    endcase.
    SECOND PAGE CODE:
    LAYOUT CODE:-
    <htmlb:content design="design2003">
      <htmlb:page title = "Employee Details">
        <htmlb:form>
    <h1>Employee Details</h1>
    <htmlb:tableView id="Employee"
                     table="<%= t_yh1205%>"
                     selectionMode = "lineEdit"
                     design="ALTERNATING">
    </htmlb:tableView>
        </htmlb:form>
      </htmlb:page>
    </htmlb:content>
    Hope this is helpful.Let me know if you need any more help.
    Thanks
    kalyan

  • Interactive Report with specific rows editable

    I have an interactive reports, with the edit (pencil) link to a maintenance form. I only want the link to show for specific records in the reports. Can you put a condition in the link column to the pencil for certain records?
    If so, how can you access the value of the field? ie. I need to check the value of 'USER_NAME' in the select below against :APP_USER
    select A.pk_id as "PK_ID",
    A.fk_sis_user as "FK_SIS_USER",
    A.list_name as "LIST_NAME",
    A.list_description as "LIST_DESCRIPTION",
    B.user_name as "USER_NAME",
    A.creation_date as "CREATION_DATE"

    Not exactly what you are asking for, but it may give you an idea hot to create conditional
    icon and link.
    From always excellent examples from Denes Kubicek:
    http://apex.oracle.com/pls/otn/f?p=31517:23:3086073313243153::NO
    HTH
    Thomas

  • Interactive report with pagination

    Hi,
    i have create an interactive report with pagination .i have follow instraction form
    [http://dbswh.webhop.net/apex/f?p=BLOG:READCAT:0::::CATEGORY:10800346812869]
    i have put JQuary in Page HTML HEADER .
    Now it show me that code in header in my page .No value in my pagination select list.
    How can i solve this problem.
    Thanks

    Hi friends,
    i have sort out that problem,
    i have jus put JQuary code in JavaScript Section.
    Thanks

Maybe you are looking for