Dynamically Colour Cells in an Interactive Report

My application requires an interactive report where cells are colour coded and the cell may, or may not have a value, but the value doesn't relate to the colour.
The report is based on a view which returns a result set as follows:
rn col1_value col1_colour col2_value col2_colour col3_value col3_colour col4_value col4_colour
1        null        grey          3        null       null        null        null        red
2        null        null          3        grey       null        null           4        red
3        null        grey       null        null          3        null        null        redIn the results, each cell to be displayed has two columns per row, one with the colour and one with the value to display where null is the default colour (white)/no value.
In Apex 4.1 I can set the colour based on the values using the dynamic actions on the report display, but I can't work out how to set the colour of col1_value based on the results of col1_colour. I am hoping there is a way to set the colour of the cell col1_value and hide col1_colour from the report.
If you know of any posts providing an example of how this may work, or if you are able to explain it to me I would really appreciate your time.
I appreciate it may not be simple to see what I am aiming for given the text restriction and no images/tables available on the forum, hopefully you get the idea, but if not, ask and I will try and explain further.
I have seen Blog posts about 3-4 years old on how you do this in Apex 3.0 or older, but can't work out how to get this to work in Apex 4.0 or Apex 4.1.

I have solved this using Javascript in a Dynamic Action, javascript something like:
$("td[headers='COL1_COLOUR']").each(function(){
   switch($(this).text())
      case "grey":
           $(this).parent().children("td[headers='COL1_VALUE']").css({"background-color":"#999"});
           break;
      case "green":
           $(this).parent().children("td[headers='COL1_VALUE']").css({"background-color":"green"});
           break;
      case "blue":
           $(this).parent().children("td[headers='COL1_VALUE']").css({"background-color":"blue"});
           break;
      case "orange":
           $(this).parent().children("td[headers='COL1_VALUE']").css({"background-color":"orange"});
           break;
      case "yellow":
           $(this).parent().children("td[headers='COL1_VALUE']").css({"background-color":"yellow"});
           break;
      default:
           break;
    $(this).css({"visibility":"hidden"});
    $("th[id='COL1_COLOUR']").css({"visibility":"hidden"});
});

Similar Messages

  • Displaying different colors for cells/columns in Interactive Report

    Hi,
    I have a requirement to display just the 'cells' in the Interactive Report columns with different colors.
    There are 3 columns in the Interactive report.
    The color coding for all the 3 different columns should be such that:
    <40% - red color
    40-70-orange
    greater than 70%-green
    I tried the highlight option in the report and saved the report as default, but still the color condition ended up getting displayed to the end user. I dont want this.
    Can someone suggest a better way to handle this requirement?

    Perhaps explore similar solutions described here
    Background Colour of Report Cell Issues.
    Scott

  • Need Help calling Dynamic Action from Link in Interactive Report

    Hello I have an Interactive Report. I would like to have a Dynamic Action called when the user selects a row (Clicks a Link).
    I am running Application Express 4.0.2.00.07 on Oracle 11gR1.
    Any help would be great.

    Hi VANJ,
    Sorry for the poorly written original post. I will be much more specific.
    I have a Interactive Report on page 40. That report has a column named X_UID that is a link back to page 40 and sets a text item named P40_X_UID in a Region we will call "Form X" with the value of the column. That page refresh also then calls a Automated Row Fetch process to fetch all the values needed for the rest of the page items in the "Form X" region. Also "Form X" region has a conditional display on to only display when P40_X_UID is not null.
    What I would like to do:
    When the user clicks on link in the IR for X_UID instead of the "Form X" region becoming visible I would like to become modal. I am trying to use a Plug-In named "ClariFit Simple Modal - Show". I have it working with a Dynamic Action when you click a Page Item. But I would like to to work when the link is clicked and the data populated.
    I hope that helps some.

  • Help - How to colour columns in interactive reports

    Hi,
    How do I colour columns in an interactive report ?
    I have created a solution to help student explore the many thousands of courses in the UK - with the results showing in an interactive report:
    https://production001-demandanalysis.db.em1.oraclecloudapps.com/apex/f?p=20300118:1
    (To get to results, interactive report, click a subject and then pick a subject from the course cloud.)
    What I want to achieve is the colouring of the columns - as currently shown - but programatically - without the user being able to see all the highlights I had to enter to achieve this.
    Any help greatly appreciated.
    Steve
    Apex version 4.2.2

    U can change the sql code for report in following way to color column.
    select
    AFFIRMATION_STATUS as AFFIRMATION_STATUS ,
    AFFIRMATION_DATE as AFFIRMATION_DATE,
    case when AFFIRMATION_STATUS = 'Affirmed' then 'green'
          when AFFIRMATION_STATUS = 'Rejected' then 'red'
        end the_color
    from MAIN_INTERFACE
    so it will generate a report with three columns viz affirmation_status and affirmation_date and the_color . Now open the_color column in report attribute tab.In column formating put "<span style="color:#THE_COLOR#;font-weight:bold;">#AFFIRMATION_DATE#</span>". If value of affirmation_status is affirmed then affirmation_date's value will come in greeen color. If its rejected , it will come in red color.

  • Background image on Interactive report column

    Hi,
    I have had a request from a customer with regards to displaying a background image behind a column on an interactive report.
    The interactive report is used to show notes added for an individual in the application.
    They want to display a note image behind the text to make the note stand out better.
    Is it possible to add a background image to the each cell in the interactive report
    Thanks
    Kevin
    Edited by: Cod'ead on Nov 30, 2009 3:43 PM

    Take a look at this list of threads (You may find something that helps..) : Oracle Application Express (APEX)
    Thank you,
    Tony Miller
    Webster, TX

  • Interactive Report's Column Definition - Single Row View Label Bug?

    Hello,
    I have an Interactive report that I've added a Blue background to certain column headings (done by giving Column Heading a background color), this works fine except for the Single Row view - it displays the &lt;....&gt; code I used to get the background color and the column heading. I've tried to change the Single Row View Label by unchecking the 'Use Same Text for Single Row View' on the Column Definition and giving a different label, it just ignores whatever I put in and shows the Column Heading with the &lt; .... &gt; code. Is this a Bug or am I doing something wrong?
    Thanks,
    Anna

    Hi Anna,
    I believe that it is a bug.
    If the 'Use Same Text for Single Row View' checkbox is unticked and some text is entered in the 'Single Row View Label' field it gets ignored completely when viewed in the single row view and the existing value in 'Column Heading' is used.
    I wanted to do something similar to you, colouring some of the Interactive Report column headers, and it works fine in the IR report itself but shows the code (span style:color etc) in the single row query. I am using Apex 3.1.1 and the Sand Theme.
    I created a simple application on apex.oracle.com using the red theme and in single row view it still ignores the 'Single Row View Label' but interestingly shows the Column Heading text without the code. This indicates that there could be a work-around by altering the theme.
    Regards,
    Chris

  • Expanding column header interactive Reports dynamically

    In my interactive Reports one of my columns specifically my db_CUSTOMER_NAME column can be from 3 to 50 characters. (or even longer...)
    Was wondering how i can dynamically expand that td column "Dynamically" because i dont want to put a fix length just because there maybe 2 records that goes over +50 characters.
    Right now i set my column width to 150 px and there the occasional word wrap that happens which i don't want as it looks "funny."

    PandaOracle wrote:
    In my interactive Reports one of my columns specifically my db_CUSTOMER_NAME column can be from 3 to 50 characters. (or even longer...)
    Was wondering how i can dynamically expand that td column "Dynamically" because i dont want to put a fix length just because there maybe 2 records that goes over +50 characters.
    Right now i set my column width to 150 px and there the occasional word wrap that happens which i don't want as it looks "funny."If the requirement is to prevent word wrap in a specific column's cells, add the following style sheet to the page HTML Header:
    <style>
    .apexir_WORKSHEET_DATA td[headers="db_CUSTOMER_NAME"] {
      white-space: nowrap;
    </style>Ensure that <tt>db_CUSTOMER_NAME</tt> used in the selector exactly matches the <tt>id</tt> attribute of the column header.

  • Interactive report and font colours

    Apex : current version
    I have an interactive report that displays details from Table 1.
    I need to display the data is different colours. How do I do that?
    Eg: name of employees in green their email id in red etc etc.
    Can I do this ? If yes, please tell me how do I do this?
    Thanks in advance.

    LKSwetha wrote:
    Hi Joe,
    The colour varies in fields based on what is displayed.
    For instance, I have the main employees table and a skills table with values Job A, Job B ,Job C etc.
    Different employees are skilled for different jobs so emp1 can have job A and job b while emp2 can have job D and job A etc
    The interactive report actually pulls data from a view I created based on the emp table and skill table
    emp1 job A Job B
    emp2 job D job A
    I want to display all Job A(displayed in report) in green colour and Job B in red and so on....Then why didn't you say so originally?
    Eg: name of employees in green their email id in red etc etc.No mention of skills, jobs or conditions.
    I want to know of we can do this and if yes how do I achieve it.Yes you can do this. If you had searched the forum before posting you'd have found out how to do it more than 24 hours ago.
    The real question is whether you should be doing this at all. Why do you think actually need/want to do this? It doesn't seem to provide any real usability benefit, and appear very likely to violate Web Content Accessibility Guidelines.
    But if you must...
    As interactive reports lack the HTML Expression feature of standard reports, the standard way to do this unfortunately requires violating the separation of concerns and generating structural (a <tt>span</tt> element) and presentational (an in-line style sheet) aspects in the query:
    select
    ⋮        
           , case
               when sk.skill = 'Job A'
               then
                 '<!-- ' || sk.skill || ' --><span style="color: green;">' || sk.skill || '</span>'
               when sk.skill = 'Job B'
               then
                 '<!-- ' || sk.skill || ' --><span style="color: red;">' || sk.skill || '</span>'
               ⋮
             end job1
    ⋮For columns to be properly sortable, the leading edge of the column must be an HTML comment that provides the required sort order using character semantics.
    The Display As column attribute for such columns must be set to Standard Report Column.
    This method has side effects: some IR filters won't work; aggregate calculations can't be applied to the column; and report exports contain the HTML rather than the expected value.
    Other approaches involve using Dynamic Actions/jQuery/JavaScript.
    However, if there are more than a few jobs/skills involved, or this information is volatile and subject to change then this method breaks down. To start with, there are only 17 named CSS colours, so if your minimal CSS knowledge doesn't extend to specifying colours in another way and you've more than 16 jobs then they can't all have a unique colour (white/silver/gray will be invisible on some IR backgrounds). It's also difficult/tedious to maintain this type of hard coding if the data changes frequently. How many jobs/skills are there?
    For more than 3 or 4 jobs a better approach would be to store the CSS colours or classes in a column in the skills table, and just select it with the job name:
    select
    ⋮        
           , '<!-- ' || sk.skill || ' --><span style="color: ' || sk.color || ';">' || sk.skill || '</span>' job1
           , '<!-- ' || sk.skill || ' --><span style="color: ' || sk.color || ';">' || sk.skill || '</span>' job2

    I am not so familiar with CSS so am bit confused while trying previous steps given by fac586What is confusing (other than posting a question different to the one you actually want answered)?
    You will be able to achieve very little in APEX if you are unfamiliar with the web technologies it uses. Spend some time on the tutorials here: start with HTML, then XHTML, CSS, Javascript and the HTML DOM, and now HTML5.
    Can you give me any simpler steps to achieve this? No, that is the simplest way to implement what was originally asked for.
    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) and if so, whether the tabular form is declarative—using only report attributes and a wizard generated MRU process—or manual—using apex_item calls in the query and custom processing—or some hybrid approach.)
    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.
    Read the FAQ and forum sticky threads if you haven't done so already.

  • Dynamic action with interactive report region refresh

    Hi!
    I'm using APEX 4.02
    I've got a page with 2 regions.
    Region1 is a (input) form
    Region2 is an interactive report on the same table as region 1
    When entering values on the form I'm trying to dynmically lookup similar records in the table with the interactive report.
    I've made a dynamic action on the change of the form fields which should refresh the interactive report region. I can see this one fires if I add a alert to debug if it fires.
    The dynamic report is based on a query with bind variables pointing to the form fields, for example
    where
    field1 = :P2_FIELD1
    This works great on the page load, so no dynamic action is fired but I can see the rows in the report region are the ones I am looking for.
    But the refresh of the report region is not working, it is never refreshing and/or showing the correct data after a change of the form fields, so it looks like the dynamic action "refresh region" is not working on the interactive report.
    Any ideas why this can go wrong ?
    I would like to solve this using standard dynamic actions and preferrably not via PL/SQL or JS, shoudl be possible if I should believe the documentation... ;)
    Cheers
    Bas
    Edited by: bklerk on 26-apr-2011 3:07

    Hi,
    When you change value to item, I assume you do not set value to session state.
    Use interactive report advanced attributes "Page Items to Submit" , set items session state before report is refreshed.
    http://download.oracle.com/docs/cd/E17556_01/doc/user.40/e15517/app_comp.htm#sthref1235
    Similar post/issue here
    Hide and show region - hides on refresh
    Regards,
    Jari

  • Dynamically set maximum row count in Interactive Report

    Hi,
    Has anyone worked out a way of dynamically setting (e.g. via select list) the maximum row count value for an Interactive Report, taking into account issues with order by when the report is filtered. I'm aware of solutions like this: http://www.talkapex.com/2010/10/apex-reports-no-limit-downloads.html but as far as I can tell this doesn't work when the report is filtered and the IR is rewritten in the background. Data sets then become unreliable because they are reordered.
    Thanks,
    Mike

    Hi Mike,
    You can do that with javascript
    gReport.search('SEARCH',100)the 100 you can replace for any number you like.I have a report with filter,sorting and groups and it is gives no problem there.
    any number means any number but not higher than the number you set at Maximum Rows Per Page.
    You probably can mix the solution from Martin and the above code.
    Regards,
    Kees Vlek
    <tt>Company: http://www.orcado.nl
    Blog: http://www.orcado.nl/blog/blogger/listings/69-kvlek
    Twitter: http://www.twitter.com/skier66</tt>
    If the question is answered please change it to answered and mark the appropriate post as correct/helpfull.
    Edited by: kvlek on 24-apr-2013 12:29
    Edited by: kvlek on 24-apr-2013 12:35

  • Dynamic Action based on Interactive Report Select List Value

    I'd like to perform a Dynamic Action when a user selects one of 3 options from a Select List within an Interactive Report:
    select APEX_ITEM.SELECT_LIST(
    p_idx => 3,
    --p_value         =>   deptno,
    p_list_values => 'Copy;Copy,Delete;Delete,Export to PDF;Export to PDF',
    --p_attributes    =>   'style="color:red;"',
    p_show_null => 'YES',
    p_null_value => NULL,
    p_null_text => '--Select--',
    --p_item_id       =>   'f03_#ROWNUM#',
    p_item_id => 'P6_IR_SELECT_LIST',
    p_item_label => 'Label for f03_#ROWNUM#',
    p_show_extra => 'YES') "Actions"
    from dual;
    When building the Dynamic Action, I chose the following values from the Advanced wizard
    Event: Select
    Selection Type: DOM Object
    DOM Object: P6_IR_SELECT_LIST
    Condition: Equal to
    Value: "Delete"
    True Action: Execute Javascript Code: Alert('Here');
    Doesn't seem to be firing...can anyone help?
    Thanks in advance,
    John

    Hi,
    I am not sure if the "equal to" condition applies to a DOM object... after all, a DOM object can be anything (any HTML element) not only a field.
    Try using a javascript expression instead, like this:
    $v('P6_IR_SELECT_LIST')=='Delete'UPDATE: Sorry, I just tested and "equal to" condition works for DOM objects... should have tested before posting!
    Luis
    Edited by: Luis Cabral on Feb 29, 2012 4:45 PM

  • Dynamic Headings on Interactive Report

    Hi,
    I have an interactive report that I would like to use dynamic headings. I have looked at some of the posts here and have followed what I think is the correct way to do this, but I am still not seeing the headings I am expecting.
    I created items to hold the headings and have created a process to populate these items, that all seems to work fine, I can view the session state and see the headings.
    I added the items to the report on the Report Attributes page under "Heading". I used the substitution for the items as &P2_HEADING1.
    When I look at the report all I see for the substituted heading is &P2_HEADING1. and not the value I would expect.
    It seems I am missing a step? Any ideas?
    Thanks,
    Peter

    Hi,
    The process point should be ok.
    The only other things I can think of are either there is an error in the code (the "Session" link on the developer's toobar will show if the value is being set) or there is a space after the page item name (difficult to see on screen but can cause problems) which makes the item name different to what you expect.
    Andy

  • Interactive Report - Icon View - Dynamic Columns per Rows ?

    Hi all,
    We use the icon view functionnality in Interactive Report.
    Is there a way to display the 'columns per row' attribute as an application item and set it dynamical via PL/SQL ?
    Any suggestions?
    Thanks in advance for advices,
    Regards,
    Grégory

    Hi,
    Apex 4.0 interactive reports and images (Scott's thread)
    Have some useful information and pointers to the solution you are looking for.
    I hope this help.
    Thank you,
    Ranish

  • Dynamic Heading in Interactive Report

    In standard reports it is possible to create dynamic headings using PL/SQL.
    Does anyone know of a way of doing this for Interactive Reports?
    I have a report that needs to change date headings dependant on the selected start date.
    Thanks,
    Jon

    Item names (or built-in names like APP_ID) appearing in HTML and which begin with ampersand and end with a period are substituted with their session state values only when the names are upper case. The reason for this is to increase parsing efficiency with respect to differentiation between Application Express references and standard HTML references such as:
    &_nbsp;
    &_amp;
    &_lt;
    &_gt;
    ...etc., (ignore underscore in each of the above).
    This ought to be documented better.
    Scott

  • Interactive Reports Download In Colour format in html and csv

    Hi All I want to download interactive report in colour format(as it is format) in html and csv using apex 4.0.2
    Regards
    Robert

    http://en.wikipedia.org/wiki/Comma-separated_values
    A comma-separated values (CSV) file stores tabular data (numbers and text) in plain-text form. As a result, such a file is easily human-readable (e.g., in a text editor).re: colours of html output
    interestingly, there are settings in print attributes, but they have no bearing on the output... obviously nothing to do with the html output. Probably best bet is BI Publisher, where you can define your own report templates.

Maybe you are looking for

  • Parameter based on decode/function field - slow response

    Hi, When one of the parameters of a report is used, the report takes a very long time to run. The parameter has a LOV of statuses in Hebrew. The folder is a custom folder and the status in Hebrew is a decode field using a function. In other words, it

  • Hp laserjet 1536dnf mfp with firmware corrupt 2 download why

    how fix the issue

  • "this device isn't eligible for the requested build."

    I've just changed carrier and got a new sim card. My iphone 3gs will not work with my new sim because it is locked to my old carrier. I called my old carrier and they removed the lock from the phone and said all i had to do now was restore the phone

  • Iphoto organizing???

    In my photos section, my pictures are separated by the Month/Year, but all in one big mess of pictures. I can no longer visibly see the Month/Year?? How do I get that back on?!  I want to see "July 2013" then those pictures under it again.  

  • Why can't I see my files in Finder, using Lion?

    Hi - I'm running Lion 10.7.2 and have noticed in Finder that the contents of many folders aren't visible.  This seems to be for newer files added.  For example, I copied a folder from a thumb drive, into my (username) -> (Documents) folder.  I see th