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

Similar Messages

  • 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
    -------------------------------------------------------------------

  • 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 Reporting and Custom SQL

    I have SQL that works in TOAD and I'd like to copy it directly into IR; however, it appears that the custom SQL feature only allows you to "customize" the FROM, WHERE, etc parts of the SELECT statement and not the database fields that are directly after the SELECT. For example, the code below works in TOAD:
    SELECT cr_type,
    LPAD(SUBSTR(CR_NUM,1,5),5) CR,
    TITLE,
    nvl(sum(decode(a.employee_Id,1234,hours)),0) DL,
    nvl(sum(decode(a.employee_Id,5678,hours)),0) MF,
    nvl(sum(decode(a.employee_Id,9101,hours)),0) HM, etc
    I am having a hard time re-creating this code in IR. I finally did manage to come close to what TOAD gives me; however, is there an easier way to use the custom SQL to just cut and paste the entire SQL statement that works in TOAD and put it into IR?
    Thanks.
    Terri T.

    You can Import the complete SQL String into IR, but you will not be able to modify it once it is in IR.
    You can create Computed Items in the Request Line for each of the SQL segments, i know it is labor some but it works. Just make sure that the Data Type is as you want it - Options Tab.
    Another Option is to have the SQL String you have turned into a view on the database and query it that way.
    Wayne Van Sluys
    TopDown Consulting

  • Interactive report and default-filter

    ahoj!
    i have a question regarding interactive reports and default-filter for a date: is it possible to use the current date for the default-filter? apex need 'dd.MM.yyyy' for the filter... already tried to_date(sysdate, 'dd.MM.yyyy')
    thx in advance,
    christian

    Hi,
    I've just been trying the "in the last" option and had no problems for any number that I entered. Are you just entering 1 into the box? What error do you get?
    I've loaded the page with Debug switched on, and get:
    select
           null as apxws_row_pk,
           "DATE_ID",
           "ATD_DATE",
           "CHECK",
           count(*) over () as apxws_row_cnt
    from (
    select  *  from (
    select
    apex_item.checkbox(1, DATE_ID) "CHECK",
    "DATE_ID",
    "ATD_DATE"
    from "#OWNER#"."ATD_DATES"
    )  r
    where ("ATD_DATE" between systimestamp - (1 * :APXWS_EXPR_1) and systimestamp)
    ) r where rownum <= to_number(:APXWS_MAX_ROW_CNT):APXWS_EXPR_1 would contain the value 1 as that is what I've entered for the filter. My report's sql statement is just the innermost nested select statement, the rest has been added by the IR functionality and the filter.
    Andy

  • Interactive Reports and APEX 3.0

    hi -- I built some initial prototype pages (forms, reports, etc) in Apex 3.0. Have recently upgraded to 3.2, and in building more reports I see that there
    is an option for an Interactive Report (and it's the default). Was this available in 3.0? I was new enough to APEX that I may not have picked up on it if it was... but what I can see is that for the Reports I created in 3.0 (Where the region is PL/SQL function body returning SQL Query) there is no option, in the Region Definition, to migrate the report to an interactive report (as it appears there should be, from looking at post:
    Can we change a report to interactive
    The only task option is undo region source.
    If Interactive Reports weren't available in 3.0, is there any way to convert existing reports? Or would I just need to re-create them?
    Also, is there a tabular form that also supports interactive report features? I'm guessing not... but thought I'd ask.
    Thanks,
    Carol

    Interactive Reports were introduced in Application Express 3.1:
    http://www.oracle.com/technology/products/database/application_express/html/3.1_new_features.html
    http://www.oracle.com/technology/obe/apex/apexusr31/apexusr31.htm
    I will try and find a link about the conversion details (updated below).
    You only get the conversion option on the right hand of the screen for the Standard SQL Reports, not "SQL Query (PL/SQL function body returning SQL query)".
    If you were to change it to the standard SQL type (which may not be possible) it would give you the option after applying the change. Interactive Reports only work on standard SQL queries, and not SQL generated from a function body.
    -Richard
    Edited by: rwendel on Jan 5, 2010 2:55 PM

  • What is the difference between interactive report and alv interactive repor

    what is the difference between interactive report and alv interactive report
    could u plz explain clearly.

    Hi Rajesh,
    interactive report or alv interactive report , both are same but except the viewer, Abap List Viewer (ALV).
    Here in i am placing a sample simple ALV Interactive report.
    Just double click on the customer number to go to the next screen.
    *& Report  ZKAL_ALV_INTERACTIVE_1                                      *
    REPORT  ZKAL_ALV_INTERACTIVE_1                  .
    TYPE-POOLS: SLIS.
      TYPES: BEGIN OF TY_KNA1,
              KUNNR TYPE KUNNR,
              NAME1 TYPE NAME1,
              ORT01 TYPE ORT01,
            END OF TY_KNA1.
      TYPES: BEGIN OF TY_VBAK,
              VBELN TYPE VBELN,
              ERNAM TYPE ERNAM,
              ERDAT TYPE ERDAT,
              NETWR TYPE NETWR,
              WAERK TYPE WAERK,
             END OF TY_VBAK.
    &--WORK AREA & TABLE DECLARATION--
      DATA: W_KNA1 TYPE TY_KNA1.
      DATA: T_KNA1 TYPE STANDARD TABLE OF TY_KNA1 INITIAL SIZE 1.
      DATA: W_VBAK TYPE TY_VBAK.
      DATA: T_VBAK TYPE STANDARD TABLE OF TY_VBAK INITIAL SIZE 1.
    &--FIELDCAT TABLE & WORK AREA--
      DATA: W_FCAT TYPE SLIS_FIELDCAT_ALV.
      DATA: T_FCAT TYPE SLIS_T_FIELDCAT_ALV.
      DATA: W_FCAT1 TYPE SLIS_FIELDCAT_ALV.
      DATA: T_FCAT1 TYPE SLIS_T_FIELDCAT_ALV.
    &--EVENT TABLE AND WORK AREA--
      DATA: W_EVENTS TYPE SLIS_ALV_EVENT.
      DATA: T_EVENTS TYPE SLIS_T_EVENT.
      DATA: W_EVENTS1 TYPE SLIS_ALV_EVENT.
      DATA: T_EVENTS1 TYPE SLIS_T_EVENT.
    &--COMMENT TABLE & WORK AREA--
      DATA: W_COMMENT TYPE SLIS_LISTHEADER.
      DATA: T_COMMENT TYPE SLIS_T_LISTHEADER.
      DATA: W_COMMENT1 TYPE SLIS_LISTHEADER.
      DATA: T_COMMENT1 TYPE SLIS_T_LISTHEADER.
    &----APPENDING FCAT -
      W_FCAT-COL_POS = 1.
      W_FCAT-FIELDNAME = 'KUNNR'.
      W_FCAT-SELTEXT_M = 'CUST. NO'.
      W_FCAT-HOTSPOT = 'X'.            "HOT SPOT HAND SYMBOL
      W_FCAT-EMPHASIZE = 'C119'.       "FOR COLORING THE COLUMN 1
      APPEND W_FCAT TO T_FCAT.
      CLEAR W_FCAT.
      W_FCAT-COL_POS = 2.
      W_FCAT-FIELDNAME = 'NAME1'.
      W_FCAT-SELTEXT_M = 'CUST. NAME'.
      APPEND W_FCAT TO T_FCAT.
      W_FCAT-COL_POS = 3.
      W_FCAT-FIELDNAME = 'ORT01'.
      W_FCAT-SELTEXT_M = 'CITY'.
      APPEND W_FCAT TO T_FCAT.
      W_FCAT1-COL_POS = 1.
      W_FCAT1-FIELDNAME = 'VBELN'.
      W_FCAT1-SELTEXT_M = 'ORDER NO'.
      W_FCAT1-EMPHASIZE = 'C519'.
      APPEND W_FCAT1 TO T_FCAT1.
      CLEAR W_FCAT.
      W_FCAT1-COL_POS = 2.
      W_FCAT1-FIELDNAME = 'ERNAM'.
      W_FCAT1-SELTEXT_M = 'NAME OF PARTY'.
      APPEND W_FCAT1 TO T_FCAT1.
      W_FCAT1-COL_POS = 3.
      W_FCAT1-FIELDNAME = 'ERDAT'.
      W_FCAT1-SELTEXT_M = 'DATE'.
      APPEND W_FCAT1 TO T_FCAT1.
      W_FCAT1-COL_POS = 4.
      W_FCAT1-FIELDNAME = 'NETWR'.
      W_FCAT1-SELTEXT_M = 'ORDER VALUE'.
      APPEND W_FCAT1 TO T_FCAT1.
      W_FCAT1-COL_POS = 5.
      W_FCAT1-FIELDNAME = 'WAERK'.
      W_FCAT1-SELTEXT_M = 'CURRENCY'.
      APPEND W_FCAT1 TO T_FCAT1.
    &--APPEND COMMENTRY--
      W_COMMENT-TYP = 'H'.
      W_COMMENT-INFO = 'CUSTOMER DETAILS'.
      APPEND W_COMMENT TO T_COMMENT.
      CLEAR W_COMMENT.
    &--APPEND EVENTS TABLE--
      W_EVENTS-NAME = 'TOP_OF_PAGE'.
      W_EVENTS-FORM = 'TOPPAGE'.
      APPEND W_EVENTS TO T_EVENTS.
      W_EVENTS-NAME = 'USER_COMMAND'.
      W_EVENTS-FORM = 'SUB2'.
      APPEND W_EVENTS TO T_EVENTS.
      W_EVENTS1-NAME = 'TOP_OF_PAGE'.
      W_EVENTS1-FORM = 'TOPPAGE1'.
      APPEND W_EVENTS1 TO T_EVENTS1.
      CLEAR W_EVENTS1.
      W_EVENTS1-NAME = 'USER_COMMAND'.
      W_EVENTS1-FORM = 'SUB3'.
      APPEND W_EVENTS1 TO T_EVENTS1.
      SELECT-OPTIONS: CUSTNO FOR W_KNA1-KUNNR.
      SELECT KUNNR
             NAME1
             ORT01 FROM KNA1 INTO TABLE T_KNA1
             WHERE KUNNR IN CUSTNO.
    CALL FUNCTION 'REUSE_ALV_GRID_DISPLAY'
    EXPORTING
       I_CALLBACK_PROGRAM                = 'ZKAL_ALV_INTERACTIVE_12'
       I_BACKGROUND_ID                   = 'BIKE'
       I_GRID_TITLE                      = 'CUSTOMER DETAILS'
       IT_FIELDCAT                       = T_FCAT
       IT_EVENTS                         = T_EVENTS
      TABLES
        T_OUTTAB                          = T_KNA1  .
      FORM TOPPAGE.
      CALL FUNCTION 'REUSE_ALV_COMMENTARY_WRITE'
        EXPORTING
          IT_LIST_COMMENTARY       = T_COMMENT
         I_LOGO                   = 'LOGO_ALV'.
      ENDFORM.  "END OF TOPPAGE SUB.
      FORM SUB2 USING UCOMM LIKE SY-UCOMM FIELDS1 TYPE SLIS_SELFIELD.
      READ TABLE T_KNA1 INTO W_KNA1 INDEX FIELDS1-TABINDEX.
      SELECT VBELN
             ERNAM
             ERDAT
             NETWR
             WAERK
                   FROM VBAK
                   INTO TABLE T_VBAK
                   WHERE KUNNR = W_KNA1-KUNNR.
    CALL FUNCTION 'REUSE_ALV_GRID_DISPLAY'
    EXPORTING
       I_CALLBACK_PROGRAM                = 'ZKAL_ALV_INTERACTIVE_12'
       I_BACKGROUND_ID                   = 'KALEEM'
       I_GRID_TITLE                      = 'LIST OF ORDERS'
       IT_FIELDCAT                       = T_FCAT1
       IT_EVENTS                         = T_EVENTS1
      TABLES
        T_OUTTAB                          = T_VBAK.
    ENDFORM.    "END OF SUB2.
    FORM TOPPAGE1.
    &--APPEND COMMENTRYOF SECONDRY SCREEN--
      W_COMMENT1-TYP = 'H'.
      W_COMMENT1-INFO = 'LIST OF ORDERS'.
      APPEND W_COMMENT1 TO T_COMMENT1.
      W_COMMENT1-TYP = 'S'.
      W_COMMENT1-KEY = 'CUSTOMER'.
      W_COMMENT1-INFO = W_KNA1-KUNNR.
      APPEND W_COMMENT1 TO T_COMMENT1.
      CLEAR W_COMMENT.
      W_COMMENT1-TYP = 'A'.
      W_COMMENT1-INFO = W_KNA1-NAME1.
      APPEND W_COMMENT1 TO T_COMMENT1.
      CLEAR W_COMMENT1.
      CALL FUNCTION 'REUSE_ALV_COMMENTARY_WRITE'
        EXPORTING
          IT_LIST_COMMENTARY       = T_COMMENT1
         I_LOGO                   = 'LOGO_ALV'
    REFRESH T_COMMENT1.
    ENDFORM.    "END OF TOPPAGE1
      FORM SUB3 USING UCOMM LIKE SY-UCOMM FIELDS1 TYPE SLIS_SELFIELD.
        READ TABLE T_VBAK INTO W_VBAK INDEX FIELDS1-TABINDEX.
    SET PARAMETER ID 'AUN' FIELD W_VBAK-VBELN.
    CALL TRANSACTION 'VA02' AND SKIP FIRST SCREEN.
      ENDFORM.
    U can also find some of the useful codes on WIKI-SDN.
    Reward helpful Answers.
    Regds,
    Kaleem.

  • Difference between Interactive report and ALV Interactive report.

    What is the difference between Interactive report and ALV Interactive report.
    i think there is no much difference the same Interactive report Events and functionality we will implement with ALV.
    Experts guide me.

    Hi,
    ALV interactive report gives many advantages than interactive report like sorting, summing and getting graphics.
    An interactive report generally basic list displayed. User double clicks on any valid line or user selects a line and presses as button on the tool bar. Then the corresponding event is triggered
    refer
    http://www.sapgenie.com/abap/drill_down_reports.htm
    You can find a interactive ALV report here
    http://www.sap-img.com/abap/an-interactive-alv-report.htm
    also refer
    Below threads consist of number of interactive ALV codes:
    interactive ALV code
    ALV-INTERACTIVE.
    Interactive ALV
    Regards

  • Uploading logo into interactive reports and ALV rerports

    hi experts,
                how to upload logo into interactive reports and ALV reports.
                                        thank u.

    hi for  any thing in alv check these links,
    chk out these links..
    Simple ALV report
    http://www.sapgenie.com/abap/controls/alvgrid.htm
    http://wiki.ittoolbox.com/index.php/Code:Ultimate_ALV_table_toolbox
    ALV
    1. Please give me general info on ALV.
    http://www.sapfans.com/forums/viewtopic.php?t=58286
    http://www.sapfans.com/forums/viewtopic.php?t=76490
    http://www.sapfans.com/forums/viewtopic.php?t=20591
    http://www.sapfans.com/forums/viewtopic.php?t=66305 - this one discusses which way should you use - ABAP Objects calls or simple function modules.
    2. How do I program double click in ALV?
    http://www.sapfans.com/forums/viewtopic.php?t=11601
    http://www.sapfans.com/forums/viewtopic.php?t=23010
    3. How do I add subtotals (I have problem to add them)...
    http://www.sapfans.com/forums/viewtopic.php?t=20386
    http://www.sapfans.com/forums/viewtopic.php?t=85191
    http://www.sapfans.com/forums/viewtopic.php?t=88401
    http://www.sapfans.com/forums/viewtopic.php?t=17335
    4. How to add list heading like top-of-page in ABAP lists?
    http://www.sapfans.com/forums/viewtopic.php?t=58775
    http://www.sapfans.com/forums/viewtopic.php?t=60550
    http://www.sapfans.com/forums/viewtopic.php?t=16629
    5. How to print page number / total number of pages X/XX in ALV?
    http://www.sapfans.com/forums/viewtopic.php?t=29597 (no direct solution)
    6. ALV printing problems. The favourite is: The first page shows the number of records selected but I don't need this.
    http://www.sapfans.com/forums/viewtopic.php?t=64320
    http://www.sapfans.com/forums/viewtopic.php?t=44477
    7. How can I set the cell color in ALV?
    http://www.sapfans.com/forums/viewtopic.php?t=52107
    8. How do I print a logo/graphics in ALV?
    http://www.sapfans.com/forums/viewtopic.php?t=81149
    http://www.sapfans.com/forums/viewtopic.php?t=35498
    http://www.sapfans.com/forums/viewtopic.php?t=5013
    9. How do I create and use input-enabled fields in ALV?
    http://www.sapfans.com/forums/viewtopic.php?t=84933
    http://www.sapfans.com/forums/viewtopic.php?t=69878
    10. How can I use ALV for reports that are going to be run in background?
    http://www.sapfans.com/forums/viewtopic.php?t=83243
    http://www.sapfans.com/forums/viewtopic.php?t=19224
    11. How can I display an icon in ALV? (Common requirement is traffic light icon).
    http://www.sapfans.com/forums/viewtopic.php?t=79424
    http://www.sapfans.com/forums/viewtopic.php?t=24512
    12. How can I display a checkbox in ALV?
    http://www.sapfans.com/forums/viewtopic.php?t=88376
    http://www.sapfans.com/forums/viewtopic.php?t=40968
    http://www.sapfans.com/forums/viewtopic.php?t=6919
    Go thru these programs they may help u to try on some hands on
    ALV Demo program
    BCALV_DEMO_HTML
    BCALV_FULLSCREEN_DEMO ALV Demo: Fullscreen Mode
    BCALV_FULLSCREEN_DEMO_CLASSIC ALV demo: Fullscreen mode
    BCALV_GRID_DEMO Simple ALV Control Call Demo Program
    BCALV_TREE_DEMO Demo for ALV tree control
    BCALV_TREE_SIMPLE_DEMO
    BC_ALV_DEMO_HTML_D0100
    reward points if useful,
    regards,
    venkat.

  • Interactive report and ALV s in HR ABAP.

    hi all,
         can any one tell , how to do  Interactive reporting  and alv's in HR ABAP. with some example reports..

    Hi Rao
    Nothing changes for HR ABAP when it comes to ALV or Interactive Lists. Only the DATA fetching process is changed. To fetch HR data , you use Logical Database PNP or Clusters or just read a specific infotype using a method.
    Here is a sample program for ALV 'BALVST02_GRID'. For interactive list , use this demo program
    DEMO_LIST_INTERACTIVE_1. It is a series of Demo Programs which you can open in SE38.
    Reward Points, if helpful.
    Regards
    Waz

  • What is the difference in Interactive reports and Drill down reports?

    What is the difference in Interactive reports and Drill down reports? Are they same?

    Hi FRD ,
    Both are same .
    as far as i know there is no difference .
    bye .

  • SQL, PL/SQL Expression and PL/SQL function

    In a Post Calculation Computation field I wanted the following computation:
    if B is X
    then
    field = A
    else
    field = B
    end if;
    or as a decode
    Decode(B,X,A,B)
    I could not get this to work so I wrote a database function that simulates the decode. So when I put:
    My_decode(B,X,A,B)
    in the field it did work.
    Basically I am not sure what kind of code one is expected to put into SQL, PL/SQL Expression and PL/SQL function fields. Can someone give an example of each? Also the APEX help is sometimes incorrect.
    For example if you click the "Post Calculation Computation" label it says:
    The For example, if this item is named P1_X, you could use post calculation expressions such as UPPER(:P1_X), INITCAP(:P2_Y), MIN(:P1_X,:P2_Y-200), NVL(:P1_X,:P2_Y), or a function call such as return my_func(:P1_X); to set the final value of the item.
    But if you put return my_func(:P1_X); in the field you get an error. It should be just my_func(:P1_X);
    thanks Rene

    DECODE is only available in SQL, so would have to be used in a SQL Expression.Yes, that's what APEX keeps telling me when I use in in a field that has "SQL or PL/SQL expression" above it. So what do you put in the field?

  • Diff between interactive report and interactive alv

    Diff between interactive report and interactive alv? Suppose I have been given certain program then how I will diffrentiate that this prog should be done in interactive alv or interactive report.

    hi
    both are used for same purpose
    interactive report means an output list which displays basic details & allow user to interact, so that a new list is populated based on user-selection. With interactive list, the user can actively control data retrieval and display during the session.
    I suggest to use ALV.by using ALV we can display in Grid as well as list format.
    Output format will be good . Sorting,Filtering facilities are provided by itself.We can have column headings also.
    if helpful reward points

  • What i sthe diff b/w   Interactive Report  and ALV Interactive report

    Hi All,
    I want to know the basic diff b/w Interactive  report and ALV interactive report.
    Can any one tell me the exact diif.
    Thanks in Advance,
    Jd

    hi jagadish,
    both are used for same purpose
    interactive report means an output list which displays basic details & allows user to interact, so that a new list is populated based on user-selection. With interactive list, the user can actively control data retrieval and display during the session. a total no of 21 lists including main list are genearetd in interactive lists.
    I suggest to use ALV.by using ALV we can display in Grid as well as list format.
    Output format will be good . Sorting,Filtering facilities are provided by itself.We can have column headings also. using oops we can also do alv reporting.
    if helpful reward some points.
    with regards,
    suresh babu aluri.

  • Interactive report and search feature

    Hi
    I have an interactive report and when i click on the down arrow of the control panel the search list drops down behind the report so i cant see it.
    Can anyone help please
    Thanks in advance

    Do you have some CSS over ride that adds an z-index property to the region with a larger value than 1000(the default value I can find for the search drop down menu for my theme)
    anyway try adding another style to the page header
    &lt;style&gt;
    #apexir_columnsearch, {
        z-index:9999;
    &lt;/style&gt;
    Check with some large value for z-index

Maybe you are looking for