CASE statement (or similar functionality) in interactive report?

Hello,
I've written a report based on an anonymous block of PL/SQL that allows me to show a different colored icon on the report based on the value of one of the columns - show green if value is less than x, show yellow if value is between x and y, and show red if value is greater than y.
Here is the code block:
for i in (select proj_id, proj_name,
CASE
WHEN proj_cost < 10 THEN '<img src="#APP_IMAGES#green-circle.jpg">'
WHEN proj_cost > 10 and proj_cost <15 THEN '<img src="#APP_IMAGES#yellow-circle.jpg">'
WHEN proj_cost > 15 THEN '<img src="#APP_IMAGES#red-circle.jpg">'
ELSE NULL
END proj_cost
from project)
loop
htp.p('<p>' || i.proj_id || ', ' || i.proj_name || i.proj_cost ||'</p>');
end loop;
Can I do something similar with an interactive report? I want the flexibility of the interactive report but the ability to still include this customer requirement in the report.
Thanks!
-melissa

Hi,
You can use your select as interactive report region source
select proj_id,
proj_name,
CASE
WHEN proj_cost < 10 THEN '<img src="#APP_IMAGES#green-circle.jpg">'
WHEN proj_cost > 10 and proj_cost <15 THEN '<img src="#APP_IMAGES#yellow-circle.jpg">'
WHEN proj_cost > 15 THEN '<img src="#APP_IMAGES#red-circle.jpg">'
ELSE NULL
END proj_cost
from projecIt should work fine
Just make sure that column where is image type is "Standard report column".
If it is "Display as text" it will not show HTML
Br,JAri
Edited by: jarola on Mar 16, 2010 4:18 PM
for substitution sting APP_IMAGES you need probably use &APP_IMAGES. instead of #APP_IMAGES#
Other vise it should be fine

Similar Messages

  • Case statement and Decode function both are not working in Select cursor.

    I have tried both the Case statement and Decode function in Select cursor, but both the things are not working. On the other hand both the things work in just select statement.
    See the first column in select (PAR_FLAG), I need to have this evaluated along with other fields. Can you please suggest some thing to make this work. And also I would like to
    know the reason why decode is not working, I heard some where Case statement do not work with 8i.
    Author : Amit Juneja
    Date : 06/20/2011
    Description:
    Updates the Diamond MEMBER_MASTER table with the values from
    INC.MEM_NJ_HN_MEMBER_XREF table.
    declare
    rec_cnt number(12) := 0;
    commit_cnt number(4) := 0;
    cursor select_cur is
    Select DECODE(1,
    (Select 1
    from hsd_prov_contract R
    where R.seq_prov_id = PM.seq_prov_id
    and R.line_of_business = H.line_of_business
    and R.PCP_FLAG = 'Y'
    and R.participation_flag = 'P'
    and SYSDATE between R.EFFECTIVE_DATE AND
    NVL(R.TERM_DATE,
    TO_DATE('31-DEC-9999', 'DD-MON-YYYY'))),
    'Y',
    'N') PAR_FLAG,
    H.SEQ_ELIG_HIST,
    H.SEQ_MEMB_ID,
    H.SEQ_SUBS_ID,
    H.SUBSCRIBER_ID,
    H.PERSON_NUMBER,
    H.EFFECTIVE_DATE,
    H.TERM_DATE,
    H.TERM_REASON,
    H.RELATIONSHIP_CODE,
    H.SEQ_GROUP_ID,
    H.PLAN_CODE,
    H.LINE_OF_BUSINESS,
    H.RIDER_CODE_1,
    H.RIDER_CODE_2,
    H.RIDER_CODE_3,
    H.RIDER_CODE_4,
    H.RIDER_CODE_5,
    H.RIDER_CODE_6,
    H.RIDER_CODE_7,
    H.RIDER_CODE_8,
    H.MEDICARE_STATUS_FLG,
    H.OTHER_STATUS_FLAG,
    H.HIRE_DATE,
    H.ELIG_STATUS,
    H.PREM_OVERRIDE_STEP,
    H.PREM_OVERRIDE_AMT,
    H.PREM_OVERRIDE_CODE,
    H.SEQ_PROV_ID,
    H.IPA_ID,
    H.PANEL_ID,
    H.SEQ_PROV_2_ID,
    H.SECURITY_CODE,
    H.INSERT_DATETIME,
    H.INSERT_USER,
    H.INSERT_PROCESS,
    H.UPDATE_DATETIME,
    H.UPDATE_USER,
    H.UPDATE_PROCESS,
    H.USER_DEFINED_1,
    H.SALARY,
    H.PEC_END_DATE,
    H.REASON_CODE,
    H.PEC_WAIVED,
    H.BILL_EFFECTIVE_FROM_DATE,
    H.BILLED_THRU_DATE,
    H.PAID_THRU_DATE,
    H.SUBSC_DEPT,
    H.SUBSC_LOCATION,
    H.USE_EFT_FLG,
    H.BENEFIT_START_DATE,
    H.SEQ_ENROLLMENT_RULE,
    H.MCARE_RISK_ACCRETION_DATE,
    H.MCARE_RISK_DELETION_DATE,
    H.MCARE_RISK_REFUSED_DATE,
    H.COMMENTS,
    H.USER_DEFINED_2,
    H.USER_DEFINED_3,
    H.RATE_TYPE,
    H.PCPAA_OCCURRED,
    H.PRIVACY_ON,
    H.PCP_CHANGE_REASON,
    H.SITE_CODE,
    H.SEQ_SITE_ADDRESS_ID,
    PM.seq_prov_id rendered_prov
    from hsd_member_elig_history H,
    INC.PCP_REASSIGN_RPRT_DATA P,
    hsd_prov_master PM
    where P.subscriber_id = H.subscriber_id
    and P.rendered_pcp = PM.provider_ID
    and H.elig_status = 'Y'
    and (H.term_date is NULL or H.term_date >= last_day(sysdate))
    order by H.Seq_memb_id;
    begin
    for C in select_cur loop
    rec_cnt := rec_cnt + 1;
    update hsd_member_elig_history
    set term_date = TRUNC(SYSDATE - 1),
    term_reason = 'PCPTR',
    update_datetime = SYSDATE,
    update_user = USER,
    update_process = 'TD33615'
    where seq_elig_hist = C.seq_elig_hist
    and seq_memb_id = C.seq_memb_id;
    INSERT INTO HSD_MEMBER_ELIG_HISTORY
    (SEQ_ELIG_HIST,
    SEQ_MEMB_ID,
    SEQ_SUBS_ID,
    SUBSCRIBER_ID,
    PERSON_NUMBER,
    EFFECTIVE_DATE,
    TERM_DATE,
    TERM_REASON,
    RELATIONSHIP_CODE,
    SEQ_GROUP_ID,
    PLAN_CODE,
    LINE_OF_BUSINESS,
    RIDER_CODE_1,
    RIDER_CODE_2,
    RIDER_CODE_3,
    RIDER_CODE_4,
    RIDER_CODE_5,
    RIDER_CODE_6,
    RIDER_CODE_7,
    RIDER_CODE_8,
    MEDICARE_STATUS_FLG,
    OTHER_STATUS_FLAG,
    HIRE_DATE,
    ELIG_STATUS,
    PREM_OVERRIDE_STEP,
    PREM_OVERRIDE_AMT,
    PREM_OVERRIDE_CODE,
    SEQ_PROV_ID,
    IPA_ID,
    PANEL_ID,
    SEQ_PROV_2_ID,
    SECURITY_CODE,
    INSERT_DATETIME,
    INSERT_USER,
    INSERT_PROCESS,
    UPDATE_DATETIME,
    UPDATE_USER,
    UPDATE_PROCESS,
    USER_DEFINED_1,
    SALARY,
    PEC_END_DATE,
    REASON_CODE,
    PEC_WAIVED,
    BILL_EFFECTIVE_FROM_DATE,
    BILLED_THRU_DATE,
    PAID_THRU_DATE,
    SUBSC_DEPT,
    SUBSC_LOCATION,
    USE_EFT_FLG,
    BENEFIT_START_DATE,
    SEQ_ENROLLMENT_RULE,
    MCARE_RISK_ACCRETION_DATE,
    MCARE_RISK_DELETION_DATE,
    MCARE_RISK_REFUSED_DATE,
    COMMENTS,
    USER_DEFINED_2,
    USER_DEFINED_3,
    RATE_TYPE,
    PCPAA_OCCURRED,
    PRIVACY_ON,
    PCP_CHANGE_REASON,
    SITE_CODE,
    SEQ_SITE_ADDRESS_ID)
    values
    (hsd_seq_elig_hist.nextval,
    C.SEQ_MEMB_ID,
    C.SEQ_SUBS_ID,
    C.SUBSCRIBER_ID,
    C.PERSON_NUMBER,
    trunc(SYSDATE),
    C.TERM_DATE,
    C.TERM_REASON,
    C.RELATIONSHIP_CODE,
    C.SEQ_GROUP_ID,
    C.PLAN_CODE,
    C.LINE_OF_BUSINESS,
    C.RIDER_CODE_1,
    C.RIDER_CODE_2,
    C.RIDER_CODE_3,
    C.RIDER_CODE_4,
    C.RIDER_CODE_5,
    C.RIDER_CODE_6,
    C.RIDER_CODE_7,
    C.RIDER_CODE_8,
    C.MEDICARE_STATUS_FLG,
    C.OTHER_STATUS_FLAG,
    C.HIRE_DATE,
    C.ELIG_STATUS,
    C.PREM_OVERRIDE_STEP,
    C.PREM_OVERRIDE_AMT,
    C.PREM_OVERRIDE_CODE,
    C.SEQ_PROV_ID,
    C.IPA_ID,
    C.PANEL_ID,
    C.SEQ_PROV_2_ID,
    C.SECURITY_CODE,
    SYSDATE,
    USER,
    'TD33615',
    SYSDATE,
    USER,
    'TD33615',
    C.USER_DEFINED_1,
    C.SALARY,
    C.PEC_END_DATE,
    C.REASON_CODE,
    C.PEC_WAIVED,
    C.BILL_EFFECTIVE_FROM_DATE,
    C.BILLED_THRU_DATE,
    C.PAID_THRU_DATE,
    C.SUBSC_DEPT,
    C.SUBSC_LOCATION,
    C.USE_EFT_FLG,
    C.BENEFIT_START_DATE,
    C.SEQ_ENROLLMENT_RULE,
    C.MCARE_RISK_ACCRETION_DATE,
    C.MCARE_RISK_DELETION_DATE,
    C.MCARE_RISK_REFUSED_DATE,
    C.COMMENTS,
    C.USER_DEFINED_2,
    C.USER_DEFINED_3,
    C.RATE_TYPE,
    C.PCPAA_OCCURRED,
    C.PRIVACY_ON,
    C.PCP_CHANGE_REASON,
    C.SITE_CODE,
    C.SEQ_SITE_ADDRESS_ID);
    commit_cnt := commit_cnt + 1;
    if (commit_cnt = 1000) then
    dbms_output.put_line('Committed updates for 1000 records.');
    commit;
    commit_cnt := 0;
    end if;
    end loop;
    commit;
    dbms_output.put_line('Total number of MEMBER_ELIG_HISTROY records inserted : ' ||
    rec_cnt);
    exception
    when others then
    raise_application_error(-20001,
    'An error was encountered - ' || sqlcode ||
    ' -error- ' || sqlerrm);
    end;

    user10305724 wrote:
    I have tried both the Case statement and Decode function in Select cursor, but both the things are not working. Please define what you mean by not working even if your computer screen is near the internet we can't see it.
    You should also look at the FAQ about how to ask a question
    SQL and PL/SQL FAQ
    Particularly *9) Formatting with {noformat}{noformat} Tags* and posting your version.
    know the reason why decode is not working, I heard some where Case statement do not work with 8i.
    Does this mean you are using 8i? Then scalar sub queries - selects within the select list, are not supported, along with CASE in PL/SQL.
    Select DECODE(1,
    * (Select 1
    from hsd_prov_contract R
    where R.seq_prov_id = PM.seq_prov_id
    and R.line_of_business = H.line_of_business
    and R.PCP_FLAG = 'Y'
    and R.participation_flag = 'P'
    and SYSDATE between R.EFFECTIVE_DATE AND
    NVL(R.TERM_DATE,
    TO_DATE('31-DEC-9999', 'DD-MON-YYYY')))*,
    'Y',
    'N') PAR_FLAG,
    >
    exception
    when others then
    raise_application_error(-20001,
    'An error was encountered - ' || sqlcode ||
    ' -error- ' || sqlerrm);
    http://tkyte.blogspot.com/2008/01/why-do-people-do-this.html                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                       

  • CASE Statement error in function -- Please help!

    Hi All,
    I created a function in my report.
    It has a SQL query similar to the one below. The query works fine in SQL plus.
    It has a CASE statement. I am getting error at line4 at the select statement. Error is: "Encountered symbol 'SELECT'....."
    Can we use CASE statements like this in reports that use SELECT statements for RETURN EXPRESSIONS. Do we have to do any special?
    Can someone help me out of this trouble?
    THanks in advance.
    SELECT PARENT_id,
         CASE WHEN EXISTS (SELECT PARENT_id FROM CHILD CH1 WHERE CH1.PARENT_id = PARENT.PARENT_id AND UPPER(CH1.description) LIKE '%ABC%') THEN
              (SELECT CH2.MOD_id FROM CHILD CH2 WHERE CH2.PARENT_id = PARENT.PARENT_id AND UPPER(CH2.description) LIKE '%ABC%')
         ELSE
              (SELECT MOD_id FROM
              (SELECT MOD_id,PARENT_id FROM CHILD CH3 ORDER BY started) MOD2 WHERE MOD2.PARENT_id = PARENT.PARENT_id AND ROWNUM = 1
         END
    ) MOD_ID
    FROM PARENT;

    take out the parentheses after the PARENT_ID and see
    like below
    SELECT parent_id,
           CASE
              WHEN EXISTS (
                     SELECT parent_id
                       FROM CHILD ch1
                      WHERE ch1.parent_id = PARENT.parent_id
                        AND UPPER (ch1.description) LIKE '%ABC%')
                 THEN (SELECT ch2.mod_id
                         FROM CHILD ch2
                        WHERE ch2.parent_id = PARENT.parent_id
                          AND UPPER (ch2.description) LIKE '%ABC%')
              ELSE (SELECT mod_id
                      FROM (SELECT   mod_id, parent_id
                                FROM CHILD ch3
                            ORDER BY started) mod2
                     WHERE mod2.parent_id = PARENT.parent_id AND ROWNUM = 1)
           END AS mod_id
      FROM PARENT;       

  • How to call function in INteractive Report!!

    Hi All,
    After investing on interactive report i have came to know that we can have only sql query but not Dynamic Sql query!
    By using PIPELINED FUNCTIONS we can use dynamic sql in Apex Interactive Reports.
    Here is the url for refernece- http://sungur.wordpress.com/2009/10/11/apex-interactive-reports-with-dynamic-sql/
    When i had tried to implement the the above one it is throwing error as
    Query cannot be parsed, please check the syntax of your query. (ORA-06575: Package or function GET_TABLE_ROWS2 is in an invalid state)
    Can any one help me out how to overcome the scenerio and resolve the problem?
    Since it is urgent can any one help me out to resolve it.
    Thanks in Advance,
    Anoo..

    Hi Anoo,
    Step 4:
    Create a process that will populate the heading page items with the relevant column name values from the dynamic query. This can be done by splitting the select line using the commas and extracting the dynamic column headers.This is Nothing But in Interactive report the column name is taking as a heading for every column, Otherwise we can go to change the column heading in report attributes(STEP 3).
    What they said we can try to change the column head dynamically.
    Like Ex:
    Select ename "Employee Name" from emp;The above Example we are taking ename but it displayed as Employee Name.
    I tried that but its taking 50 columns cant write that much of query.
    Now you got it?
    Cheers,
    Shan..

  • Compute function on interactive report

    Hi Every 1,
    I need some help with an interactive report i am trying to produce. What i am trying to do is use to compute function of an interactive report and add the actual count from a week (e.g. week 26) and add it to the forecast count of that week
    The problem that i have is that they are on different rows
    The table below shows that i am working with.
    Week No|Forecast Count|Actual Count*
    ____26__|_______0______|___128231____
    ____26__|____180916____|______0______
    ____27__|_______0______|___164666____
    ____27__|____180916____|______0______
    ____28__|_______0______|___169302____
    ____28__|____180916____|______0______
    ____29__|_______0______|___159857____
    ____29__|____180916____|______0______
    ____30__|_______0______|___162210____
    ____30__|____180916____|______0______
    ____31__|_______0______|___152471____
    ____31__|____180916____|______0______
    Any help would be welcome :)
    Thanks in advance
    -N.S.N.O.

    Is that the only way that this could be done?
    I have tried to get the values on the same row but it has proved very very difficult.
    The query i use to get the data is this:
    select ROUND(TO_NUMBER(TO_CHAR(TO_DATE(rpad(con_add_td_hr, 10),'yyyy-mm-dd'),'ddd')-2)/7)+1 "Week No", 0, sum(cons_total) "Actual Count"
    from corcon01_hour_totals
    where db_name='CSAHEPA' and substr(con_add_td_hr,1,4)='2008' and CON_ADD_USER_ID not like '%LDL%'
    group by ROUND(TO_NUMBER(TO_CHAR(TO_DATE(rpad(con_add_td_hr, 10),'yyyy-mm-dd'),'ddd')-2)/7)+1
    UNION
    select week_no, sum(manual_entry_cons)+sum(citedi_cons)"Forecast Data", 0
    from concount_forecast_data
    where db_name ='CSAHEPA' and year ='2008'
    group by week_no
    The problem that i have is that the 2 tables are not relate and do not have a matching table structure. For the actual count table i have to generate the week number using a data/hour column.
    If you have any suggestions i would be very grateful.
    Thanks
    -N.S.N.O.
    Edited by: N.S.N.O. on Sep 16, 2008 2:21 AM

  • Case Statement in Analytic Function SUM(n) OVER(PARTITION BY x)

    Hi Guys,
    I have the following SQL that doesn't seem to consider the When clause I am using in the case staement inside the analytic function(SUM). Could somebody let me know why? and suggest the solution?
    Select SUM(Case When (A.Flag = 'B' and B.Status != 'C') Then (NVL(A.Amount_Cr, 0) - (NVL(A.Amount_Dr,0))) Else 0 End) OVER (PARTITION BY A.Period_Year) Annual_amount
         , A.period_year
         , B.status
    , A.Flag
    from A, B, C
    where A.period_year = 2006
    and C.Account = '301010'
    --and B.STATUS != 'C'
    --and A.Flag = 'B'
    and A.Col_x = B.Col_x
    and A.Col_y = C.Col_y
    When I use this SQL, I get
    Annual_Amount Period_Year Status Flag
    5721017.5 --------- 2006 ---------- C -------- B
    5721017.5 --------- 2006 ---------- O -------- B
    5721017.5 --------- 2006 ---------- NULL ----- A
    And when I put the conditions in the where clause, I get
    Annual_Amount Period_Year Status Flag
    5721017.5 ---------- 2006 ---------- O -------- B

    Here are some scripts,
    create table testtable1 ( ColxID number(10), ColyID number(10) , Periodname varchar2(15), Flag varchar2(1), Periodyear number(15), debit number, credit number)
    insert into testtable1 values(1, 1000, 'JAN-06', 'A', 2006, 7555523.71, 7647668)
    insert into testtable1 values(2, 1001, 'FEB-06', 'B', 2006, 112710, 156047)
    insert into testtable1 values(3, 1002, 'MAR-06', 'A', 2006, 200.57, 22376.43)
    insert into testtable1 values(4, 1003, 'APR-06', 'B', 2006, 0, 53846)
    insert into testtable1 values(5, 1004, 'MAY-06', 'A', 2006, 6349227.19, 6650278.03)
    create table testtable2 ( ColxID number(10), Account number(10))
    insert into testtable2 values(1, 300100)
    insert into testtable2 values(2, 300200)
    insert into testtable2 values(3, 300300)
    insert into testtable2 values(4, 300400)
    insert into testtable2 values(5, 300500)
    create table apps.testtable3 ( ColyID number(10), Status varchar2(1))
    insert into testtable3 values(1000, 'C')
    insert into testtable3 values(1001, 'O')
    insert into testtable3 values(1002, 'C')
    My SQL:
    select t1.periodyear
         , SUM(Case When (t1.Flag = 'B' and t3.Status != 'C') Then (NVL(t1.credit, 0) - (NVL(t1.debit,0))) Else 0 End) OVER (PARTITION BY t1.PeriodYear)
         Annual_amount
         , t1.flag
         , t3.status
         , t2.account
    from testtable1 t1, testtable2 t2, testtable3 t3
    where t1.colxid = t2.colxid
    and t1.colyid = t3.colyid(+)
    --and t1.Flag = 'B' and t3.Status != 'C'
    Result:
    PeriodYear ----- AnnualAmount ----- Flag ----- Status ----- Account
    2006 ------------------ 43337 --------------- A ----------- C ---------- 300100
    2006 ------------------ 43337 --------------- B ----------- O ---------- 300200
    2006 ------------------ 43337 --------------- A ----------- C ---------- 300300
    2006 ------------------ 43337 --------------- B ------------ ----------- 300400
    2006 ------------------ 43337 --------------- A ------------ ----------- 300500
    With condition "t1.Flag = 'B' and t3.Status != 'C'" in where clause instead of in Case statement, Result is (which is desired)
    PeriodYear ----- AnnualAmount ----- Flag ----- Status ----- Account
    2006 ------------------ 43337 --------------- B ----------- O ---------- 300200

  • Turn a case statement into a function

    I have a case statement (from an earlier post - thank you) that works. I was wondering if it could be edited and change into a function instead. I think it would be cleaner. The variable is set in the Form Properties (pCounterA).
    switch (pCounterA.value)
        case "1":
        profileA__1image.rawValue = profileA_1image.value.image.value;
        pCounterA.value = "2";
        break;
        case "2":
        profileA__1image.rawValue = profileA_2image.value.image.value;
        pCounterA.value = "3";
        break;
        case "3":
        profileA__1image.rawValue = profileA_3image.value.image.value;
        pCounterA.value = "4";
        break;
        case "4":
        profileA__1image.rawValue = profileA_4image.value.image.value;
        pCounterA.value = "5";
        break;
        case "5":
        profileA__1image.rawValue = profileA_5image.value.image.value;
        pCounterA.value = "1"; // loops back to the first image
        break;

    Hi,
    If you insert a script object by right clicking on the root container (often "form1"). It will appear unnamed in the root / variables in the hierarchy.
    First of all you should name the script object, staying away from reserved names, eg "this". Say "myScripts"
    Script objects can only contain Javascript, so you would need to convert FormCalc scripts (not an issue in your case).
    When you go into the script object, you start off a function with "function" followed by its name and inputs in brackets. The extent of the function is given by curly brackets:
    function changeImage(vCounter)
         switch (vCounter)
             case "1":
             profileA__1image.rawValue = profileA_1image.value.image.value;
             pCounterA.value = "2";
             break;
         } // close switch statement
    } // close function
    Back in the form you can call the function by referencing the name of the script object and the name of the function.
    myScripts.changeImage(pCounterA.value);
    A couple of things to note:
    The input in the script can refer to an objects value or a global variable, but in the function you can assign it s different name. So above the input pCounterA.value is EQUAL to vCounter in the function;
    You can have several inputs in the call for the function separated by commas;
    Don't have the same name for the script object AND the function
    Hope that helps,
    Niall

  • Regarding case statement and decode function

    Hi Experts,
    I have question.....regarding case statement and decode statement....
    Can you please explain me that which one will be efficient,to place in insert statement...
    insert statement(
    (case when ........then
                         case when ....then
                         else
                         end)
      else
    end)
    or
    insert statement(
    case when.....then
    decode(....)
    else
    end)
    Can you people explain me which one is more efficient method?
    Thanks in advance.......

    The are major differences to talk about in case of CASE vs DECODE, but performance wise both are pretty much the same.
    Have a look at Tom's thread
    Ask Tom &amp;quot;better performance - case or decode&amp;quot;
    I would suggest to use CASE whenever possible. Don't worry about the performance part.

  • HIDE STATEMENT IS MUST OR NOT FOR INTERACTIVE REPORT

    HI,
      IN Interactive Report : without using the hide statement we will made the interactive report? and hide statement do its job after every increase of the sy-lsind please explain..
             thanks
               margani

    IT NOT BE MUST
    <u>HIDE</u>
    This statement stores - in the current list level - the content of the variable dobj together with the current list line whose line number is contained in sy-linno. The data type of the variables dobj must be flat and no field symbols can be specified that point to rows of internal tables, and no class attributes can be specified. The stored values can be read as follows:
    For each user action in a displayed screen list that leads to a list result, all the row values stored using HIDE - that is, the row on which the screen cursor is positioned at the time of the event - are assigned to the respective variables.
    If a list row of an arbitrary list level is read or modified using the statements READ LINE or MODIFY LINE, all the values of this row stored using HIDE are assigned to the respective variables.
    The HIDE statement works independently of whether the list cursor was set. In particular, variables for empty list rows can be stored - that is, rows in which the list cursor was positioned using statements like SKIP.
    The HIDE statement should be executed immediately at the statement that has set the list cursor in the row.
    Outside of classes, constants and literals that cannot be read in list results and in the statement READ LINE can be specified for dobj outside of classes.

  • How to customize an interactive report PDF using a BI Publisher template

    Hi,
    I am trying to figure out how to get an interactive report to work with BI Publisher. I want it so that I can create a custom RTF template with custom headings, and then apply this for the interactive report.
    On the front end, when a user runs an interactive report, they are able to hide and show columns, and then click on Actions > Download > PDF. I want this to access the custom template and return a PDF based on this template, and also showing the columns that the user has selected in the interactive report.
    I have already created a custom RTF Word Doc in BI Publisher, and have uploaded it into a report query created in Apex. I am not sure though how to apply this report query to an interactive report, or if that’s even what I’m supposed to do to get it to work the way I want it to.
    When editing the Report Attributes, under Print Attributes, there is a section called Printing.
    Under this, there is a "Print Server Overwrite". I thought this is where you can specify your report query. But I am not sure if I even need a report query because I don't understand why you have a report query that is based on a static query, when in an Interactive Report, the user can hide columns.
    I have Apex 4.0.1.00.03 and Oracle BI Publisher 10.1.3.4.0d installed.
    Thanks,
    Gage

    Hi Gage,
    Custom RTF and XSL-FO templates are currently only supported with classic report regions and report queries, but not with interactive reports. So you would need to create a report query based on the SQL statement you used for your interactive report and then associated your template with that report query. Unfortunately you won't be able to use any of your customizations, filters, or column selections this way. We're planing to support report layouts with interactive reports in the future.
    Regards,
    Marc

  • Interactive Report. Cell highlight.

    Hello,
    I'm using highlight functionality in Interactive Report actively and appreciate for this feature. Question: is it possible to define ONE highlight rule to ALL cells in every column. for example I need that any cell in the report which contains number 5 must be highlighted as Red ?
    I make a simple calendar connected to our production plan and in this calendar can be up to several hundreds columns - so to define a rule for each of column is a little bit laborious...
    Thanks in advance,
    Alex

    Hello,
    Oh I see what you mean you want to highlight any cell across the report that has the value 5.
    At the moment you can only do a Cell level highlighting on a column by column basis.
    You should add this to the Enhancement thread.
    Regards,
    Carl
    blog : http://carlback.blogspot.com/
    apex examples : http://apex.oracle.com/pls/otn/f?p=11933:5

  • SQL statement with Function returns slow in Interactive Report

    I have an Interactive Report that returns well but when I add in a function call in the where clause that does nothing but return a hard coded string of primary keys and is compared to a table's primary key with a like operator the performance tanks. Here is the example:
    get_school2_section(Y.pk_id,M.pk_id,I.section,:P577_SECTION_SHUTTLE) LIKE '%:' || I.pk_id || ':%'
    I have the values hard coded in the return of the function. There are no cursors run in the function, there is no processing done in the function. It only declares a variable. Sets the variable, and returns that variable back to the SQL statement.
    I can hard code the where clause value to look like this:
    ':90D8D830A877CCFFE040010A347D1A50:8ED0BBFDEAACC629E040010A347D6471:9800B8FDBD22B761E040010A347D0D9A:' LIKE '%:' || I.pk_id || ':%'
    This returns fast. When I add in the function call which returns the same hard coded values, the page goes from returning in 1 to 2 seconds to 45 or more seconds.
    Why does adding a simple function call into the where clause cause such a deterioration in performance.
    Edited by: alamantia on Aug 17, 2011 7:39 AM
    Edited by: alamantia on Aug 17, 2011 7:40 AM

    So you are telling me that the where clause with a function call will NOT run the function on every row? Please explain that to me further?
    if you have code that is the following:
    select a,b,c from a_table where a > 2 and b < 3 and function_call(c) > 0You are telling me that Oracle will NOT call that function on EVERY row it tries to process in the select?
    Thank you,
    Tony Miller
    Webster, TX
    I cried because I did not have an office with a door until I met a man who had no cubicle.
    -Dilbert
    If this question is answered, please mark the thread as closed and assign points where earned..

  • Case statement for interactive report error

    The case computation does not work for me :
    statement
    CASE WHEN G = 7 THEN G ELSE C END
    Error message ' Invalid computation expression. THEN'
    It does not seem to matter what the case statement is IE :
    CASE WHEN I = 'DEMO' THEN 'LOW' ELSE 'HIGH' END
    I have tried this on the Sample Application that is installed on my oracle workspace account
    Column G : order number ( number)
    Column C:order total (Number)
    Column I:sales Rep ( String)
    Can someone please tell me what I am doing wrong ?
    Thanks

    Your statement works for me exactly as you typed it:
    SQL> select * from t;
                       G                    C
                       1                  101
                       2                  102
                       3                  103
                       4                  104
                       5                  105
                       6                  106
                       7                  107
    7 rows selected.
    SQL> select CASE WHEN G = 7 THEN G ELSE C END
      2  from   t;
    CASEWHENG=7THENGELSECEND
                         101
                         102
                         103
                         104
                         105
                         106
                           7
    7 rows selected.

  • PL/SQL Interactive Report issues - Piped function or Collections

    Hi,
    I have a report where I either want to limit the return by date or return all. PL/SQL didn't work in the Interactive Report (is it available in 3.2?) then my second idea (2 reports; one for each option) didn't work as you can't have more than one IR on a page. Searching here I found people guiding others to here for collections and here for piped functions.
    Ok I finally understood the collections thing (didn't realise that "function_returning_query" would be replaced with your code) but I'm not sure it can be used in my situation? I want it to be dependent upon a LOV on the page with my predicted code like:DECLARE
    q VARCHAR2(30000);
    BEGIN
    q := 'select UPD_ID, PROJECT,DATABASE,REF,DESCRIP,STATUS,PERSON,
    TO_CHAR(INS_DATE, ''HH24:MI DD-MON-YY'') AS INS_DATE
    from TBL_ENV_LOG';
    IF :P5_DAYS != 1337 THEN
    q := q || ' where TBL_ENV_LOG.INS_DATE >= TO_TIMESTAMP(SYSDATE - :P5_DAYS)';
    END IF;
    q := q || ' order by TBL_ENV_LOG.INS_DATE desc';
    return(q);
    END;So the value of :P5_DAYS would need to go there somehow, can it be passed as a parameter?
    Is there another way to do this? Making lots of hidden fields is annoying :/
    Edit: I used a CASE statement for a column before, could I use that for entire queries?
    Mike
    Edited by: Dird on Oct 14, 2009 10:45 AM

    Hi,
    CREATE OR REPLACE FUNCTION BLOG_FUNC RETURN VARCHAR2 IS
    q VARCHAR2(30000);
    BEGIN
    q := 'select UPD_ID, PROJECT,DATABASE,REF,DESCRIP,STATUS,PERSON,
    TO_CHAR(INS_DATE, ''HH24:MI DD-MON-YY'') AS INS_DATE
    from TBL_ENV_LOG';
    IF :P5_DAYS != 1337 THEN
    q := q || ' where TBL_ENV_LOG.INS_DATE >= TO_TIMESTAMP(SYSDATE -' || :P5_RAD|| ')';
    END IF;
    q := q || ' order by TBL_ENV_LOG.INS_DATE desc';
    return(q);
    END;Error at line 8: PLS-00049: bad bind variable 'P5_RAD'
    I assume I need to pass parameter values like P5_RAD but how do I relate it to:Select *
    From apex_collections
    Where collection_name = ‘IR_TEST’;
    is it...
    Select *
    From apex_collections(:P5_RAD)
    Where collection_name = ‘IR_TEST’;
    ??Edit: The IR query changes to BLOG_FUNC(:P5_RAD) right?
    Edit 2: Nope that doesn't work :/
    Mike
    Edited by: Dird on Oct 15, 2009 8:35 AM
    Edited by: Dird on Oct 15, 2009 8:38 AM

  • 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

Maybe you are looking for

  • My Macbook Pro does not show up on my TV.

    How do I make my Macbook Pro show up on my 40 inch Samsung HD TV if I have tried everything in the Help menu in Displays in System Settings? I restarted, tried every resolution, gathered windows, detected displays, and everything but my Mac still doe

  • Get filename from list of measurement files

    Hi, I would like to have the user select from a list of measurement files and pass that name and path to the write to measurement file VI. Ideally, when the data is written to the measurement file the user could add comments. Any ideas? Thanks Joel

  • Rendering text that contains old-style HTML character entities, e.g. ü

    The large text-corpus I'm working with was produced before the days of widespread Unicode support, and it contains HTML character entities instead of unicode codepoints, e.g. ü for ü [u-umlaut]. I can iterate through every text column in the ArrayCol

  • EVLCK in EVDRE

    When i try open my Input schedule (contains EVLCK formula), in excel it give the value #RFR ... If i do a REFRESH, the EVLCK works. But i dont want to do a manual REFRESH when my report opens. I tried to insert the macro MNU_ETOOLS_REFRESH at the end

  • Program quits upon opening

    Recently when trying to open a saved file in DVD Studio Pro 3, it doesn't open. When opening the program and trying to say "apple-O" to open my file, it opens the "Open" window briefly and then closes it immediately. There's no time to select anythin