Javascript in report column headings?

Hello,
I'm wondering if it's possible to be able to use Javascript in report column headings, so that when the user hovers the mouse over the column heading name in the report, a pop-up appears with an explanation of what that column is. Usually I use Javascript on page items, but in this case, the column headings aren't page items, they are derived from the SELECT statement that makes the report. Is this possible using Javascript? Or, is there something I'm not aware of that Apex can do, such as the "Optional Label with Help" but for column heading names?
Thank you,
Laura

Hello Laura,
Each report column headings has an ID equal to the column name/alias as it appears in your select statement. You can use this ID to directly access the column header DOM node, just as you are doing with a page item.
In your case, you can use the ‘title’ attribute to get what you want. If your column ID is ‘COL1’, you can use something like this in the footer of your report region:
$x(‘COL1’).title = ‘Help Text’;Of course, having an ID allows you to use any JavaScript code you need.
Hope this helps,
Arie.

Similar Messages

  • Report column headings and title tag

    Is there a way to add a title tag (similar to the alt tag for images) to my report column headings, so that when I hover over the column headings I get a description of the column?

    I found a solution here:
    Title= Attribute for report column headings

  • Title= Attribute for report column headings

    Hi All,
    Is there anywhere we can specify the "title=" attribute for each of the report column headings. Unfortunately we are on Apex 2.0
    This is to facilitate the use of screen readers, and I can see nowhere this can be entered.
    We can use an anchor tag in the heading field of the column attributes which is fine such as <a title="test indicator indicator">TST </a>
    But if we apply a sort to this field, the Sort doesn't work.
    Thanks,
    Noel

    Hi Noel,
    You need to change the column heading to wrap the text in a tag that has the title attribute.
    For example, if you had a column called Name, change this to &lt;span title="Name"&gt;Name&lt;/span&gt;.
    Column sorting will still work.
    Regards
    Andy

  • Tooltips for report column headings

    Hello,
    I have a normal report, and I wanted to have either a tooltip or a cluetip for the report column headings. Can anyone please help me with this issue.
    thanks,
    orton

    Hi!
    One way would be to adjust the report template. But this is quite difficult if you haven't done this before.
    Maybe this forum post helps: Re: oracle apex and extjs grid table
    Hmm on the other side why don't you just add some html tags inside the report column headers? I would suggest this example: http://apex.oracle.com/pls/otn/f?p=25110:5
    &lt;span TITLE="header=[Help] body=[Helptext]";>YOUR COLUMN HEADER&lt;/span>Best regards,
    Tobias

  • Javascript - Referencing report column value

    Hi,
    In my application I have a report "Test" with some columns. In column "PFT_PCODE" the possible values are either 1 or 2.
    What I want is to display the report table cell in red, if the value in "PFT_PCODE" is 1, or the table cell in orange, if the value in "PFT_PCODE" is 2, respectively.
    I tried to make something in Javascript, based on a Vikas' example. I put in the
    Region Header:
    <style type="text/css">
    .rot {
    background-color: red;
    .orange {
    background-color: orange;
    </style>
    Region Footer:
    <script type="text/javascript">
    var spans=document.getElementsByTagName('span');
    for (var j=0;j<spans.length;j++) {
    if (spans[j].className=='farbe') {
    var td=html_CascadeUpTill(spans[j],'TD');
    if (document.getElementsById('#PFT_PCODE#').value == 1) {
    td.className = 'rot';
    else {
    td.className = 'orange';
    </script>
    The column "PFT_PCODE" is marked as CSS class "farbe".
    Unfortunately it's not working, I'm not sure if I reference the report column value right. Since I'm a beginner in Javascript I would be glad for help.
    I put my (reduced) application on apex.oracle.com for testing.
    Workspace: app
    Login: [email protected]
    PW: riponi
    Thanks in advance,
    Roger

    Hi Roger,
    In your report, if you do a View Source, do your report headers have id's on them - that is, the TH tags that contain the headings?
    If so, you could use:
    &lt;script type="text/javascript"&gt;
    function hilite(f1)
    var h = document.getElementById(f1);
    var t = h.parentNode;
    while (t.tagName != 'TABLE')
      t = t.parentNode;
    var rows = t.rows;
    var k;
    var j;
    var c;
    var headers = t.getElementsByTagName("TH");
    for (k = 0; k &lt; headers.length; k++)
      if (headers[k].id == f1)
        c = k;
    for (k = 1; k &lt; rows.length; k++)
      j = rows[k].getElementsByTagName("TD")[c];
      if (j.innerHTML == '2')
        j.style.backgroundColor = 'purple';
        j.style.color = 'yellow';
      if (j.innerHTML == '1')
        j.style.backgroundColor = 'red';
        j.style.color = 'white';
    &lt;/script&gt;Put that in the page's HTML Headers setting.
    In the report region's Region Footer, add in:
    &lt;script type="text/javascript"&gt;
    hilite('PFT_PCODE');
    &lt;/script&gt;This will find the heading's TH cell, work out where it is in the row, then loop through all remaining rows and check the TD cell in the same column, highlighting the cell using background and font colours.
    Andy

  • Interactive Report Column Headings and Row Height

    I am using the div style="width:350px;" method to control the width of columns in various interactive reports. That works fine except for the following:
    1. When creating filters, the <div...> stuff shows up along with the actual column heading, thus confusing some end users
    2. Even when I uncheck the "Use same text for single row view" checkbox and then provide a simple single row view label, the <div> stuff still shows up on the single row view
    Does anyone have a better solution?
    Also, does anyone know of a way to limit the row height within an interactive report row? I have some columns of data that contain a large amount of HTML data and I'd like to be able to limit the number of rows that show on the report.
    Is Oracle planning to provide some better control over the Interactive Report columns in another version? The Interactive Report is such a huge improvement in usability in APEX - it would be great to take it to another level by providing some better control over column width and row height.
    Edited by: DaleB on Jun 18, 2009 8:54 AM
    Edited by: DaleB on Jun 18, 2009 8:54 AM

    Dale,
    Unfortunately we don't have much we can use to do what you would like. I would have said it's impossible until version 4 but you could actually do something similar to what Roel has done. His trick is in the edit button. He changed the edit button to use an "onload" call to a JavaScript process. You could do the same but call a process that goes across the rows and styles each column. Now because you don't have a way to identify the column (can't use the order because the end user could change it) you'll have to write the code to look at the top row first and then style the appropriate column. As far as I can tell, this would be quite difficult and inefficient. Having said that if you need it that bad and would like some help with it, put up an example application on apex.oracle.com and provide the workspace/username/password and I'll take a look.
    Regards,
    Dan
    http://danielmcghan.us
    http://sourceforge.net/projects/tapigen
    You can reward this reply by marking it as either Helpful or Correct ;-)

  • Report Column Headings based on SQL Query

    Hi ,
    I am working on creating a SQL query based report. However, my column headers for this report are stored in a table and hence, I need the column headers to be based on a sql query also.
    Can you give me some pointers on how to do this ?
    Thanks!
    Lavanya

    Lavanya,
    The report column attributes page has a radiogroup of column heading types. One lets you specify a PL/SQL function that returns the headings.
    Scott

  • Including item names in report column headings

    I have a report where I want to use page items in the column headings. Trying to define these using (for example) &P1_ITEM. in the report definition / custom heading does not seem to work. I can define a simple PL/SQL function to return the heading, but I have many columns and it will mean that I'll have to define a function for each column name which does not seem v elegant. Am I missing something obvious?
    Thanks Simon

    Hi Simon
    Column Attributes
    Headings Type:  Column Names  Column Names (InitCap)  Custom  PL/SQL  None choose PL/SQL
    Function returning colon delimited headings:
    DECLARE
    vHEADINGS VARCHAR2(1000);
    BEGIN
    vHEADINGS := 'NAME:SURNAME:CODE:CELL_NR:&P1_CELL_1.:&P1_CELL_2.:&P1_CELL_3.:' || :XXX || ':' || :YYY || ':' || :ZZZZ || :A || ':' || :B || ':' || :C;
    RETURN vHEADINGS;
    END;Regards
    Mel

  • SQL Report column headings

    How to make the column heading bold / apply color to the column heading when Heading type used is PL/SQL ?
    Sanjay

    Lavanya,
    The report column attributes page has a radiogroup of column heading types. One lets you specify a PL/SQL function that returns the headings.
    Scott

  • Clasical Report column headings display

    Hi ABAPERS
        iam working on clasical report. in that i have to display 16 field headings.
    when executing the report, the column headers should be frozen at the top so that when the user is scrolling down, they can see what the column title is.
    how can i over come this problem.

    Hi,
    you mean the column headings should be displayed even though
    the user scrolls down the output.
    For classical reports, according to me it is not possible.
    We will be using the write statement to display the records,
    so it is static for the report.
    If you want the output what you are expecting then go for ALV's.
    Regards,
    Venkatesh

  • Display an alert message through javascript when report column item is null

    Hello,
    I have a report column item which is an select list item and now i want to display an alert message when value is null, I mean no value is selected, this alert message should be fired when update button is clicked.
    Can anyone please help me with this issue.
    Thanks,
    Orton

    You could try something like this:
    declare
      x        INTEGER;
      err_ct  INTEGER   := 0;
    begin
      x  := 5;  -- number of rows displayed
      for i in 1 ... x (
        IF wwv_flow.g_f08(i)) IS NULL THEN err_ct  := err_ct + 1;
        END IF;
      end loop;
      IF err_ct = 0 THEN
         RETURN NULL;
      ELSE
        RETURN 'Nice error message: you must supply a value.';
      END IF;This would be used with a PL/SQL validation: Function Returning Error Text.

  • BUG: Dynamic report column headings not working with some templates

    Using Apex 2.0, we are trying to create a vertical report with dynamic labels like &P26_REF_RECEIVED_DATE_L. based on items populated by PL/SQL.
    This seems to work fine for some templates but not for others. With a horizontal report template we get output like:
    <th class="t4ReportHeader" id="REF_RECEIVED_DATE">Received</th>
    <td  headers="Received" class="t4data">29-MAR-2007</td>But with the vertical template we get:
    <th>&P26_REF_RECEIVED_DATE_L.</th><td>29-MAR-2007</td>Also, if we use "default: vertical report, look 1" we see "&P26_REF_RECEIVED_DATE_L." in the output, but with "default: vertical report, look 2" we see "Received".
    Message was edited by:
    Tony Andrews

    have you checked that your report template has a
    valid value for the "Column Heading Template"
    property?This template has nothing in the "Column Heading Template" because it is designed to show the data in this form:
    Heading1 - Value1
    Heading2 - Value2
    Heading3 - Value3
    Hence both the heading and the data appear in the "Column Template 1" property as follows:
    <tr><th class="t3header">#COLUMN_HEADER#</th><td class="t3data">#COLUMN_VALUE#</td></tr>
    Maybe it is an Apex limitation that the #COLUMN_HEADER# value can't be accessed from this subtemplate? Yet somehow it works with "default: vertical report, look 2" (which I realise isn't a template as such).

  • Underline behavior in sortable report column headings

    Hi -- I have a report that uses generic columns, all of which have been given custom names. All columns
    except the edit link are sortable.
    When the report is first displayed, all column headers are underlined. The first column happens to be
    the one used for initial, default sorting. When another column is chosen as the sort-by column,
    the underline goes away for the first column. This happens every time a new column is sorted-by --
    the underline goes away on the previous sort column. If a column is re-chosen to sort by, the
    underline reappears.
    Is this behavior intentional? Is there a way to change it so the underlines don't disappear?
    Thanks,
    Carol

    Hi Carol,
    I have same sort of problem with my report when I have imported the page from another application. I have fixed it, what i did - Click on edit page >> Click on the report name under the regions >> cut or copy report query and leave the query section blank >> save the page run it. So it will not display anything as you do not have any query there. Go to Edit page again >> click on the report name >> paste the query into the query section and save the page. Run the application again, it should work.
    I guess when you have generic column selected the default format get corrupt and does some weird behavior.
    Hope this will help.
    Thanks,
    M Tajuddin
    http://tajuddin.whitepagesbd.com

  • JavaScript: Disabling textarea in report column cell  depending on flag

    Hi,
    I got an updateable report with the following behavior:
    - Depending on the value of column "PFT_PCODE" (1 or 2) the column gets a yellow or red background color.
    - If the value of column "PFT_PCODE" is 1 the next column (for remarks) gets a grey background color.
    - Some flags get values set.
    With the kind help of Andy (ATD) I got that running nicely. See also:
    Javascript - Referencing report column value and
    JavaScript: Disabling textarea in report column cell
    Now I want to add an additional feature:
    - If a flag ('P11_SPERR_FLAG') has the value '1' then the column (remarks) (var j) should be disabled.
    I tried the following (see additional code between asterisks) but it's not working. I feel a little stupid since I thought that shoud be an easy fix.
    Anyone has an idea what's wrong with the additional code? I find debugging quite difficult in JavaScript...
    ////////////////// PAGE HTM HEADER //////////////
    function hilite(f1) {
    var ft1 = document.getElementById('P11_FEHLERTYP1_FLAG');
    ft1.value = '0';
    var ft2 = document.getElementById('P11_FEHLERTYP2_FLAG');
    ft2.value = '0';
    *var sperrflag = document.getElementById('P11_SPERR_FLAG');*
    var h = 0;
    if (document.getElementById(f1)) {
         h = document.getElementById(f1);
         var t = h.parentNode;
         while (t.tagName != 'TABLE') {
              t = t.parentNode;
         var rows = t.rows;
         var k;
         var i;
         var j;
         var c;
         var headers = t.getElementsByTagName("TH");
         for (k = 0; k < headers.length; k++) {
              if (headers[k].id == f1) {
                   c = k;
         for (k = 1; k < rows.length; k++) {
              i = rows[k].cells[c];
              j = rows[k].cells[c+1].getElementsByTagName("TEXTAREA")[0];
              *if (sperrflag.value == '1') {*
    *               j.disabled = 'true';*
              if (i.innerHTML == '2') {
                   i.style.backgroundColor = 'yellow';
                   i.style.color = 'white';
                   i.style.fontWeight = 'bold';
                   i.style.fontSize = '18px';
                   ft2.value = '1';
              if (i.innerHTML == '1') {
                   i.style.backgroundColor = 'red';
                   i.style.color = 'white';
                   i.style.fontWeight = 'bold';
                   i.style.fontSize = '18px';
                   j.style.backgroundColor = 'grey';
                   ft1.value = '1';
                   //j.disabled = 'true'; //This would work.
    ////////////////// REGION FOOTER //////////////
    <script type="text/javascript">
    hilite('PFT_PCODE');
    </script>Thank you,
    Roger

    I found the solution, it had nothing to do with JavaScript:
    Item P11_SPERR_FLAG was of type Diplay as Text / Doesn't save state.
    Without saving state the JavaScript wouldn't work.
    Sorry to bother,
    Roger

  • JavaScript: Disabling textarea in report column cell

    Hi,
    Andi (ATD) helped me with formatting report columns, coloring them depending on a value. See:
    Javascript - Referencing report column value
    Now I want to add a feature:
    If the value is '1' then disable the textarea in the next column, otherwise not. The function is:
    function hilite(f1)
    var h = document.getElementById(f1);
    var t = h.parentNode;
    while (t.tagName != 'TABLE')
      t = t.parentNode;
    var rows = t.rows;
    var k;
    var i;
    var j;
    var c;
    var headers = t.getElementsByTagName("TH");
    // var textarea = t.getElementsByTagName("textarea");
    for (k = 0; k < headers.length; k++)
      if (headers[k].id == f1)
        c = k;
    for (k = 1; k < rows.length; k++)
      i = rows[k].cells[c];
      j = rows[k].cells[c+1];
      if (i.innerHTML == '2')
        i.style.backgroundColor = 'yellow';
        i.style.color = 'white';
        i.style.fontWeight = 'bold';
        i.style.fontSize = '18px';
      if (i.innerHTML == '1')
        i.style.backgroundColor = 'red';
        i.style.color = 'white';
        i.style.fontWeight = 'bold';
        i.style.fontSize = '18px';
    //  j.style.backgroundColor = 'green';   // testing purpose; colors background green but not textarea
        j.style.visibility = 'hidden';               // works fine but ugly
    //  j.disabled = 'true';                        // nothing happens
    //  j.firstChild.disabled = 'true';           // does not work
    //  j.textarea.disabled = 'true';           // does not work
    }See the 'j' object: I can make the whole cell disappear but it looks ugly. Examining it with firebug I was thinking I must use sth. like firstChild or textarea, but it does not work. I find it still quite tricky to manipulate tables in Apex...
    Could someone help with this?
    Thanks a lot,
    Roger

    Hi Roger,
    You're sort of nearly there!
    The next cell to the right of the one you are testing will contain a TEXTAREA object. Your j variable can get to this using something like:
    j = rows[k].cells[c+1].getElementsByTagName("TEXTAREA")[0];The issue with using the visibility method that you have used will then disappear as you've applied it to the whole TD object, so all borders will go - applying this to the new j will only hide the textarea object instead.
    Andy

Maybe you are looking for

  • Blinking Icons

    Hello to all, I know there is animated gif support in swings, but I have an question. Imagine, java application, communicating throug corba ( 1 tink 12 Threads used for his coomunication:) splitted pane, with treem where each leaf has its onw animate

  • My Ipod won't transfer purchases.

    My Ipod won't transfer purchases. I've tried all of the options to do so, but I click it and it doesn't do anything

  • HT5035 How much do I have left on my iTunes gift card?

    I have a few iTunes gift cards and I would like to know how much each one of them has. I've tried redeeming it but it just tells me that that card has already been redeemed. I'm pretty sure they still have a bit of money left on them and I would just

  • Printing Issue in BackGround

    Hi Guys,               I am printing my GRID in BackGround. I have created variants, while I am scheduling my job with variants I am getting this error. Printer not suitable for Job Step;automatic output not possible. Only I am able to send it to spo

  • While searching to site google box shows old sites ,how can i delete those sites.

    how can i delete the pop up sites on Google search box.