APEX Interactive Report Compute Case with multiple conditions to highlight

My ultimate is to highligt a row in an interactive report based on two conditions. I didn't see a way to use the highligt feature with two conditions. So I thought I would try to create a computation based on the two conditions. Then use that result for the highligting. Though I don't seem to be a be able to use multiple conditions in my computation Case statement. Is there a different syntax?
Here is what I have:
Case
  When  C = 'Open' and  I > 15 Then 'True'
  Else 'False'
End The error I get is: Invalid computation expression. and
Application Express 4.0.2.00.07
Thanks!
Edited by: cjmartin on Jan 10, 2012 10:57 AM

I'm surprised no one responded to this. What I did to resolve this issue was create a nested case statement. I don't think this was a good solution, but I can't find anyone else giving input. I know I can create another computational column in the select statement for the report, but the 'Interactive Report' part is where this should be. I want my clients to calculate what they want. Kind of hard when you can not use an 'and' for a range criteria.

Similar Messages

  • Interactive Reports not working with APEX listener

    Hi,
    I have posted this question APEX listener forum couple of weeks ago but very few responses.
    If any one from here can help then it would be great.
    Interactive Reports not working with APEX listener
    Best Regards,
    Baig

    Sorry for late response.
    It was a firewall issue

  • APEX Interactive Report - CSV Export Limitations?

    Hello,
    I have an interactive report generated for some users.
    The issue I'm having right now is that the results that the users need is over 100k and the export to csv option caps out at 65,535 rows. Is this a limitation on APEX Interactive Report's side and is there anyway to get around it so we can send 100k records (or more) to the users without them splitting the report many ways?
    Thanks in advance.
    Ivan

    Ivan,
    I'm afraid that I can't answer your question. The APEX insiders will have to field that one.
    As one that dislikes voluminous reports, have tried swaying your users that you now have this great interface to drill to the data you need versus downloading gobs of data and filling up their hard drives. Ask if there is something else your application can do that they would do with all that data in Excel.
    Jeff

  • Outer Joins with multiple conditions - alternatives to UNION?

    It is my understanding that Oracle 8i does not directly support mutiple conditions for outer joins. For instance, I'm looking for PEOPLE who may, or may not, be on MEDICATIONS.
    All MEDICATIONS are listed with DRUGNAME and DRUGID. There thousand of different drugs. I'm only looking for PEOPLE on either one or two of them (to make it simple) or no drug at all (ignoring all other DRUGS they're on..) IF they are on the DRUG, it's gerts printed.
    I'd ideally do a LEFT OUTER JOIN to do this with multiple conditions:
    SELECT DISTINCT
    PERSON.NAME,
    MEDICATION.DRUGNAME,
    MEDICATION.DRUGID
    FROM
    PERSON,
    MEDICATION
    WHERE
    PERSON.ID = MEDICATION.ID (+) AND
    (MEDICATION.DRUGID (+) = 632 OR
    MEDICATION.DRUGID (+) = 956)
    This, of course, is not valid, at least in 8i...
    So I've taken the UNION approach:
    SELECT DISTINCT
    PERSON.NAME,
    MEDICATION.DRUGNAME,
    MEDICATION.DRUGID
    FROM
    PERSON,
    MEDICATION
    WHERE
    PERSON.ID = MEDICATION.ID (+) AND
    MEDICATION.DRUGID (+) = 632
    UNION
    SELECT DISTINCT
    PERSON.NAME,
    MEDICATION.DRUGNAME,
    MEDICATION.DRUGID
    FROM
    PERSON,
    MEDICATION
    WHERE
    PERSON.ID = MEDICATION.ID (+) AND
    MEDICATION.DRUGID (+) = 956
    This of course, does work, but as I've added more drugs this becomes quite unwieldly and not really sure what this does to performance. (There are also several more joins to other tables, not relevent here.)
    In addition, if I import this into Crystal Reports 8.5 (as opposed to the Crystal Query Designer), it refuses to recognize the UNION.
    -- Any suggestions for alternative syntax ???
    -- Has this been addressed in 9i ???
    Thanks,
    Will

    You could try
    select Distinct Person.Name, Med.DrugName, Med.DrugId
    from Person,
    (select ID, DrugName, DrugId from Medication
    where DrugId in (632, 956) ) Med
    where Person.ID = Med.ID(+)
    SELECT DISTINCT
    PERSON.NAME,
    MEDICATION.DRUGNAME,
    MEDICATION.DRUGID
    FROM
    PERSON,
    MEDICATION
    WHERE
    PERSON.ID = MEDICATION.ID (+) AND
    (MEDICATION.DRUGID (+) = 632 OR
    MEDICATION.DRUGID (+) = 956)
    This, of course, is not valid, at least in 8i...
    So I've taken the UNION approach:
    SELECT DISTINCT
    PERSON.NAME,
    MEDICATION.DRUGNAME,
    MEDICATION.DRUGID
    FROM
    PERSON,
    MEDICATION
    WHERE
    PERSON.ID = MEDICATION.ID (+) AND
    MEDICATION.DRUGID (+) = 632
    UNION
    SELECT DISTINCT
    PERSON.NAME,
    MEDICATION.DRUGNAME,
    MEDICATION.DRUGID
    FROM
    PERSON,
    MEDICATION
    WHERE
    PERSON.ID = MEDICATION.ID (+) AND
    MEDICATION.DRUGID (+) = 956
    This of course, does work, but as I've added more drugs this becomes quite unwieldly and not really sure what this does to performance. (There are also several more joins to other tables, not relevent here.)
    In addition, if I import this into Crystal Reports 8.5 (as opposed to the Crystal Query Designer), it refuses to recognize the UNION.
    -- Any suggestions for alternative syntax ???
    -- Has this been addressed in 9i ???
    Thanks,
    Will

  • Setting the APEX interactive report items

    Hi,
    I need to reset the APEX interactive report items like apex_ir_APP_USER to some value.
    I put the below jQuery code in the javascript header page it did not work:
    <script type="text/javascript">
    $document.ready(function() {
    $('#apexir_APP_USER').val('NEW VALUE');
    </script
    Any suggestions ??
    Thanks

    The reason of me trying to set the apex interactive item is:
    For the interactive report, we enabled the subscription service, so that users can subscribe for the selective reports.
    So, when a user clicks the Actions button and selects the subscription option, then the couple of fields like email address, subject etc., are populated, with the default values.
    The email address field is auto populated with the user id like abc.efg.
    And, the email address field i would like to manipulate and change to [email protected]
    Now i was able to change the value of the hidden variable, apexir_APP_USER with the below code but when i select subscription option i still see the same user id populated in the
    email address field.
    <script type="text/javascript">
    $(document).ready(function() {
    alert('test'+ $("#apexir_APP_USER").val());
    $("#apexir_APP_USER").val("Value changed");
    alert('changed value '+ $("#apexir_APP_USER").val());
    </script>

  • How to generate a report in Excel with multiple sheets using oracle10g

    Hi,
    I need a small help...
    we are using Oracle 10g...
    How to generate a report in Excel with multiple sheets.
    Thanks in advance.
    Regards,
    Ram

    Thanks Denis.
    I am using Oraclereports 10g version, i know desformat=spreadsheet will create single worksheet with out pagination, but my requirment is like the output should be generated in .xls file, and each worksheet will have both data and graphs.
    rdf paperlayout format will not workout for generating multiple worksheets.
    Is it possible to create multiple worksheets by using .jsp weblayout(web source) in oracle reports10g. If possible please provide me some examples
    Regards,
    Ram

  • I need your expert opinion on how to create a map with multiple conditions.

    Hello.
    I need your expert opinion on how to create a map with multiple conditions.
    I have a procedure (which i cannot import or re-create in OWB due to the bug), so i am trying to create a map instead :-(
    How can i create a cursors within the map?
    My function creates table and cursor.
    Then it will have to check for duplicates in the tables (the one created and another table) - the criteria for finding duplicates is a number of fields.I then need to place few different conditions (if some attributes are not available) and it has to load cursor based on this conditions. The next step is to fetch the data into the cursor based on what attributes are missing.
    The next thing it will do is insert the data into table (if record doesn't exist), output the error in separate table is record is corrupted, or update the record with changed information.
    In short i need to re-create match / merge but with conditions, iterations etc 'built into' it.
    I can read up on available functions - it's just what would be the best options? and what would be the best approach to do so?
    In my function i use %rowtype - but cannot use it in owb - so what would be the alternative? i don't really want to create a lot of variables and then have a nightmare of maintaing it. are there any tips regarding this?
    having looked through Oracle dedupe - it's not really what i need because it is just DISTINCT.
    I would appreciate any help / advise on this.
    Thank you very much

    thanks a lot for your reply - i will look into this option :-)
    it is a bit more complicated now as i have to re-create the match / merge and then somehow 'tweak' it to achieve the result i need.
    At the moment i am looking to breakdown the package into smaller chunks 'functions' and try creating the map that way.
    Anyway, thank you very much for your suggestion.

  • MDX Calculated Member With Multiple Conditions

    I need to create a calculated member in my cube that spans multiple dimensions. A current calculated member looks like this:
    [Employee Hours Category].[Utilization Category].[NON-PTO], [Measures].[Employee Hours]
    This calculated member returns all the hours an employee worked that are not PTO.
    I need to select employee hours but with multiple conditions:
    - [DIM BILL STATUS][Bill Status] equals 0
    - [Employee Hours Time Category].[Time Category] equals "Client Facing"
    - [DIM PROJECT].[Client] isn't like "Olson"
    I know this is probably pretty easy, but I'm horrible with MDX!
    Thank you!!
    A. M. Robinson

    Thank you...
    Your answer looks good but I was actually able to figure out most of it, but still looking how to incorporate a FILTER into the MDX. I would like to FILTER like this:
     FILTER ([DIM Project].[Client].[Client].Members , 
                 NOT InStr([DIM Project].[Client].CurrentMember.MEMBER_NAME, "Olson")
    Heres the MDX I have so far that is working fine:
    ([Employee Hours Time Category].[Time Category].&[Client Facing],
       [DIM BILL STATUS].[Bill Status ID].&[1], [Measures].[Employee Hours])
    Do you just wrap the whole MDX in the filter, and if so, how would that be formatted?
    A. M. Robinson

  • APEX Interactive Report - sum multiple columns table1 X with table2 value

    I have a challenge in oracle apex, were i want to sum multiple columns to give 3 extra rows namely points, Score, %score. There are more columns but chose only few for now.
    Below is an example structure of my data:
    Town | Sector | Outside| Inside |Available|Price
    Roy-----Formal----0----------0----------1------0
    Kobus Formal--0 ---------0--------- 1------0
    Wika ---Formal----0----------0--------- 1------0
    Mevo----Formal----1----------1---------1------0
    Hoch----Formal----1----------1---------1-------1
    Points--------------2----------2----------5-------1
    Score-------------10---------10---------10------10
    %score-----------20---------20---------50------10
    Each column has a constant weighting (which serves as a factor and it can change depending on the areas) in this case the weighting for this areas are the ones in the first row for the sector Formal:
    Sector |Outside| Inside |Available|Price
    Formal----1----------1 ----------1-----1
    Informal--1----------0 ----------2-----1
    I tried using the aggregate sum function in apex but it wont work since i need the factor in the other table. Which is where my challenge started
    To compute the rows below the report:
    points = sum per column * weighting factor per column
    Score = sum of no of shops visited (in this case its 5) * weighting factor per column
    % score = points/Score * 100
    The report should display as described above. With the new computed rows below.
    I kindly ask anyone to assist me with this challenge as i tried searchin on the internet for solutions but havent come across any.
    Thanks a lot for your support in advance!!

    >
    Please update your forum profile with a real handle instead of "823433".
    I have a challenge in oracle apex, were i want to sum multiple columns to give 3 extra rows namely points, Score, %score. There are more columns but chose only few for now.
    Below is an example structure of my data: Use <tt>\...\</tt> tags as described in the FAQ when posting code and sample data and layouts. Please edit the OP and reformat the example using <tt>\...\</tt> tags so it's clear.
    Town | Sector | Outside| Inside |Available|Price
    Roy-----Formal----0----------0----------1------0
    Kobus --Formal----0 ---------0--------- 1------0
    Wika ---Formal----0----------0--------- 1------0
    Mevo----Formal----1----------1---------1------0
    Hoch----Formal----1----------1---------1-------1
    Points--------------2----------2----------5-------1
    Score-------------10---------10---------10------10
    %score-----------20---------20---------50------10Each column has a constant weighting (which serves as a factor and it can change depending on the areas) in this case the weighting for this areas are the ones in the first row for the sector Formal:
    Sector |Outside| Inside |Available|Price
    Formal----1----------1 ----------1-----1
    Informal--1----------0 ----------2-----1I tried using the aggregate sum function in apex but it wont work since i need the factor in the other table. Which is where my challenge started
    To compute the rows below the report:
    points = sum per column * weighting factor per column
    Score = sum of no of shops visited (in this case its 5) * weighting factor per column
    % score = points/Score * 100
    The report should display as described above. With the new computed rows below.
    I kindly ask anyone to assist me with this challenge as i tried searchin on the internet for solutions but havent come across any.How critical to the solution is using an interactive report? It would be much easier to do this in a standard report where you've complete control over the query SQL and the report structure.
    When you have a problem you'll get a faster, more effective response by including as much relevant information as possible upfront. This should include:
    <li>Full APEX version
    <li>Full DB/version/edition/host OS
    <li>Web server architecture (EPG, OHS or APEX listener/host OS)
    <li>Browser(s) and version(s) used
    <li>Theme
    <li>Template(s)
    <li>Region/item type(s) (making particular distinction as to whether a "report" is a standard report, an interactive report, or in fact an "updateable report" (i.e. a tabular form)
    With APEX we're also fortunate to have a great resource in apex.oracle.com where we can reproduce and share problems. Reproducing things there is the best way to troubleshoot most issues, especially those relating to layout and visual formatting. If you expect a detailed answer then it's appropriate for you to take on a significant part of the effort by getting as far as possible with an example of the problem on apex.oracle.com before asking for assistance with specific issues, which we can then see at first hand.

  • Interactive Report Compute Field Creation Computation Formula

    I'm trying to create a compute field in Interactive Report in APEX 3.
    There are two fields: 'Plan Type' and 'Product Type'.
    I want to create Compute Field - 'My Check'
    Condition is as follows:
    If 'Plan Type' field value begins with 'FY11 AA' and 'Product Type' field value ends with 'ABC' then 'My Check' field value should be 'CHECK' else 'OK'.
    'Plan Type'-----------'Product Type'----------'My Check'
    FY11 AA123---------123ABC-------------------CHECK
    FY11 BB123---------123KKK--------------------OK
    FY11 CC123---------123ZZZ--------------------OK
    Would appreciate if you can write for me a computation formula for the case above.
    Thanks,
    Guy

    Hi Jari,
    Thanks for your formula.
    When I tried that, I got error as below.
    Actual formula entered:
    case when BH = 'Y' then
    case when SUBSTR(T,1,7) = 'FY11 OU' then
    case when SUBSTR(AL,-3) = 'REC' then
    'CHECK'
    else 'OK' end
    else 'OK' end
    else 'OK' end
    Error message:
    Invalid computation expression. then case

  • Interactive Report - Compute columns

    Hi,
    Interactive report query is storing in a apex view - apex_application_page_ir.
    Like, if compute columns added in runtime, APEX is making a new query with compute columns. I want to know in which APEX view is having this query:
    I created a Interactive report (APEX 3.2.0) for the following query:
    select
    "EMPNO",
    "ENAME",
    "JOB",
    "MGR",
    "HIREDATE",
    "SAL",
    "COMM",
    "DEPTNO"
    from "EMP"
    In the run time, I added a compute column , now the query is as follows:
    select
    ROWID as apxws_row_pk,
    "EMPNO",
    "ENAME",
    "JOB",
    "MGR",
    "HIREDATE",
    "SAL",
    "COMM",
    "DEPTNO",
    "SAL" *10/100 "APXWS_CC_001",
    count(*) over () as apxws_row_cnt
    from (
    select * from (
    select
    "EMPNO",
    "ENAME",
    "JOB",
    "MGR",
    "HIREDATE",
    "SAL",
    "COMM",
    "DEPTNO"
    from "EMP"
    ) r
    ) r where rownum <= to_number(:APXWS_MAX_ROW_CNT)
    order by ROWID
    Regards
    Mohan

    it is not the sql query its all about the report_columns in apex_application_page_ir
    in case anyone landed in this page

  • Interactive report search field with autocomplete , is it possible ?

    Hi all,
    As you know the APEX provides an in-built search for interactive reports . I would like to know if its possible to add autocomplete feature to this ?
    Thanks & regards
    Umer

    Its nor working for me .
    1) I created an textfiled item- P2_REPORT_SEARCH
    2) added an interadctive report with the source as
    SELECT * FROM (
    select     "WSR"."ID" as "ID",
    "WSR"."USER_ID" as "USER_ID",
    "WSR"."FROM_DATE" as "FROM_DATE",
    "WSR"."TO_DATE" as "TO_DATE",
    "WSR"."ACTIVITIES" as "ACTIVITIES",
    "WSR"."PROJECT" as "PROJECT",
    'delete' from
    "WSR" "WSR"
    where
    ("WSR"."USER_ID" = NVL(v('APP_USER'),USER) OR NVL(v('APP_USER'),USER) = 'ADMIN' ) AND (
    "WSR"."FROM_DATE"=to_char(sysdate+ (2-to_char(sysdate,'D')))
    where (
    instr(upper("USER_ID"),upper(nvl(:P2_REPORT_SEARCH,"USER_ID"))) > 0 or
    instr(upper("ACTIVITIES"),upper(nvl(:P2_REPORT_SEARCH,"ACTIVITIES"))) > 0
    instr(upper("PROJECT"),upper(nvl(:P2_REPORT_SEARCH,"PROJECT"))) > 0
    )3) added the folowing query to html header ,
    <script>
    apex.jQuery('#report_' + pId + '_catch').trigger('apexbeforerefresh', pId);
    var l_URL =
    'p='+$v('pFlowId')+':'+$v('pFlowStepId')+':'+$v('pInstance')+':FLOW_PPR_OUTPUT_R'+pId+'_';
    if (pRefreshMode) {
    if (pRefreshMode === 'current'){
    // do nothing to url here
    } else if (pRefreshMode === 'reset') {
    l_URL += 'reset_R_' + pId;
    } else {
    if (!!pSort) {
    l_URL += pSort+'::RP&fsp_region_id='+pId;
    } else {
    l_URL +=
    'pg_R_'+pId+':NO&pg_max_rows='+pMax+'&pg_min_row='+pMin+'&pg_rows_fetched='+pFetched;
    l_URL += ':NO::P2_REPORT_SEARCH:' + $('#P2_REPORT_SEARCH').val();
    var lRequest = new apex.ajax.url(l_URL,
    function(pResponse){
    var l_s = pResponse.readyState;
    var l_Id = lRequest.report_id;
    if(l_s == 1){
    }else if(l_s == 2||l_s == 3){
    }else if(l_s == 4){
    var lTemp = $u_js_temp_drop();
    apex.jQuery('#report_'+l_Id+'_catch').attr('id', 'report_'+l_Id+'_catch_old');
    apex.jQuery(lTemp).html(pResponse.responseText);
    apex.jQuery('#report_'+l_Id+'_catch_old').replaceWith(apex.jQuery('#report_'+l_Id+'_catch'));
    apex.jQuery(lTemp).empty();
    apex.jQuery('#report_' + pId + '_catch').trigger('apexafterrefresh', pId);
    }else{return false;}
    lRequest.report_id = pId;
    lRequest._get();
    return;
    </script>
    4) a dynamic action:
    >
    Name: Instant Search
    Event: Key Release
    Items: P2_REPORT_SEARCH
    Condition: No Condition
    Action: Refresh
    Fire when event result is: True
    Selection type: Region
    Region: WSR(Interactive reoprt region)5) When I enter the query in P2_REPORT_SEARCH , no change happens in the result set of IR
    Edited by: Nice1 on May 16, 2012 1:12 AM

  • Download Customization in Apex Interactive Report

    Hi All,
    I am using Apex 3.2.
    I have some requirement, for the download the interactive data into xl sheet we can go to action menu and download the report. But in the report there is one edit link ,I dont want down load edit link data. How to avoid this edit link data.
    Thanks,
    pnr
    Edited by: pnr on Mar 28, 2011 5:59 AM

    Hello Tony,
    Your suggestion on the other thread is interesting and will be helpful on some other reporting I am doing. However, I am still running into an issue. I am unable to get the 2nd interactive report query below 114 columns since I have to keep those fields together so they can look at those fields when they make computations.
    I never did say 100 + columns is "Always" needed. However, it is still a needed feature in my opinion. I been using APEX for 2 years. This is the first time I needed this many columns. I am currently working with Institutional Advancement, which by next month will want to have over 200 columns available to them since not only will they be looking at constituents but, they will want to look at corporations as well. Discover isn't an option at this time.
    "Maybe someone can build an ad-hoc report builder for APEX applications that can be attached to applications? We have such items in Oracle Forms application I maintain now.."
    That would be delightful...
    Regards,
    Kelly

  • Interactive Report - Compute problem

    When I try and to anything with the "Compute" option of an interactive report I get:
    Invalid computation expression. ORA-00942: table or view does not exist
    Anyone know why? or which table may be missing?

    Reproduced this on apex.oracle.com
    http://apex.oracle.com/pls/otn/f?p=37327
    Login with Demo, no password and navigate to the Projects page.
    here is the query that drives the interactive report:
    select     "PROJECT"."PROJECT_ID" as "PROJECT_ID",
         "PROJECT"."PROJECT_NAME" as "PROJECT_NAME",
         "PROJECT"."PROJECT_MGR" as "PROJECT_MGR",
         "PROJECT"."DEV_DATE" as "DEV_DATE",
         "PROJECT"."CIE_DATE" as "CIE_DATE",
         "PROJECT"."QA_DATE" as "QA_DATE",
         "PROJECT"."PROD_DATE" as "PROD_DATE",
         "FDIC_DEPARTMENT"."DEPARTMENT_CODE" as "DEPARTMENT_CODE"
    from     "#OWNER#"."PROJECT" "PROJECT",
         "#OWNER#"."FDIC_DEPARTMENT" "FDIC_DEPARTMENT"
    where "PROJECT"."FDIC_DEPARTMENT_ID" ="FDIC_DEPARTMENT"."DEPARTMENT_ID" (+)

  • Report Record Row with multiple color conditionaly

    Dear Friend,
    i am using Apex 3.2 ver.
    i want to display report record row with colour .
    i want to display reoport row color blue if INVOICE_TYPE column is 'I' and RED if INVOICE_TYPE is 'C' .
    select
    am.ID,
    am.INVOICE_NO,
    am.INVOICE_NO as invoice,
    am.SBU_CODE,
    am.INVOICE_TYPE,
    am.INVOICE_DATE,
    am.AGENT_CODE,
    am.NO_OF_PAX,
    am.ADDL_FIELD5
    from "AR_INVOICE_MAS"  amHow can i disply row record conditionaly color ful .
    Thanks
    Edited by: Vedant on Oct 10, 2012 11:05 PM
    Edited by: Vedant on Oct 10, 2012 11:14 PM

    Dear Jary,
    Thanks to reply me.
    i have follow your link and font color display but bg color not display.
    now i have change in code
    select
    am.ID,
    case       when am.INVOICE_TYPE = 'C' then 'BLUE'
               when am.USER_ENTER_AMT = sum(al.NET_AMT) then 'RED'
                end the_color,
    am.INVOICE_NO,
    am.INVOICE_NO as invoice,
    am.SBU_CODE,
    am.INVOICE_TYPE,
    am.INVOICE_DATE,
    am.AGENT_CODE,
    am.NO_OF_PAX,
    am.ADDL_FIELD5,
    NVL(sum(al.NET_AMT),0) AS SUM,
    NVL(am.USER_ENTER_AMT,0.00) AS CONTROLSUM
    from "AR_INVOICE_MAS"  am ,AR_INVOICE_DTL al WHERE am.invoice_no=al.invoice_no(+)
    group by am.ID,am.invoice_no,am.SBU_CODE,am.invoice_type,am.invoice_date,am.agent_code,
    AM.NO_OF_PAX, am.ADDL_FIELD5,am.USER_ENTER_AMT Here i want to display in red below condition but it's not working.
    when am.USER_ENTER_AMT = sum(al.NET_AMT) then 'RED'How can i display Record in RED which record does not varify below condition
    when am.USER_ENTER_AMT = sum(al.NET_AMT) then 'RED'
    How can i do this.
    Thanks

Maybe you are looking for