Skip to Main Content

APEX

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

Change IR headers and single row view labels

Norbert MeOct 22 2013 — edited Oct 25 2013

Hi all,

I want to do the following:

1. Change the row headers of an interactive report

2. Add mouseover tooltips to these headers

Similar for single row view:

3. Change labels

4. Add/Change help text

The challenge is that the texts for 1.-4. are in development and may even change dynamically.

Think of the headers/labels as "shortcuts" and the help text as" full text with download headers", or "cutoff tex.." and "full text with units", or ...

Another point is that the same headers are used in different reports and, of course, the results should be the same.

So it would be cumbersome and error prone to do all this by hand.

I thought I found a JavaScript-only solution for 1.+2..

It has to be copied for every IR page. Not good, but better than handling every single column header by its own.

// How I do it:

Use a SelectList <.. id="DATADICTIONARY"> with dynamic LOV used as map. (Is there a better solution for a map? (But this would be another topic.))

Define the following function to map the column headers to tooltip text:

function setReportColumnTooltip()

{ $('div[onclick^="gReport.controls.widget"]').each( // // all headers

function(index) {

   header = $(this).parent().attr('id').toUpperCase();  // // original header text to use as key

   option = $("#DATADICTIONARY > option:contains("+header+")");  // // option tag found by key

   if (option.is('option')) {

     title = option.attr('value') + ' (' + header + ')' ;  // // here: "longname_from_map (column_name)"

   } else {

     title = 'no description available for ' + header;

   }

   $(this).attr('title', title); // // set the tooltip, I forgot to remember the genius who brought to us this simple way

}

)

;

}

Similar for setReportColumnHeaderText()

When page loads:

Hide SelectList

Call both functions

// --- done

Works fine at first sight, BUT

a similar approach for Single Row View does not work

and, WORSE, when I return from Single Row View the Report column headers are reset to the column headers from the SELECT statement.

For me it seems as if I didn't get it right how Report and Single Row View interact and/or missed the right (change?) event to call the functions.

But before I continue to guess in the wrong direction maybe somebody can direct me the right way.

I'm using Apex 4.1 but 4.2 would be alright as well.

Thanks in advance

Norbert

Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Nov 22 2013
Added on Oct 22 2013
2 comments
478 views