CEL: RS Tooltips
- Jan 2, 2016
- 2 min read

ABSTRACT (by Federico Levis ) Category: CEL
Cognos Extension Library (CEL) Feature: Flexible advanced Tooltip API and Classes that can be easily integrated in your Reports
Prerequisite: Cognos Extension Library (CEL) is installed and included in your Report
Examples of the various Tip Features, with the required CEL Code
Many Tip options are shared in CEL API and Classes: as you will see they can be easily integrated with very few Code Lines
1) HTML Tip
You have simply to call the CEL API Tip() and Untip() in the following standard events:
- onmouseover: call Tip() to display whatever HTML Tip
- onmouseout: call Untip()
Example a) to show a Tip with Bold Title and NewLines:
<span id="inputFilterFeatTxt" onmouseover="Tip('<b>POSSIBLE VALUES:</b><BR><BR>Behind the Scenes<BR>Commentaries<BR>Deleted Scenes<BR>Trailers ')" onmouseout="UnTip()" >

Example b) to show a Tip with Bold, Italic and Marked text:
<span id="inputFilterFilmTxt" onmouseover="Tip('<b>EXAMPLES:</b><BR><BR><i>Starts with</i> <mark>A</mark><BR>Filter only the Film Starting with <mark>A</mark><BR><BR><i>Contains</i> <mark>SKY</mark><BR>Filter only the Film Contaning <mark>SKY</mark>')" onmouseout="UnTip()" >

2) Tip Image "?" showing HTML Tip
CEL contains a predefined TipImg class with an Image "?" that will show the HTML Tip
Example a) Simple Text Tip
var TIP_VIS_COL= "Select the optional Columns that you want to display in the Table";
var tipImgVisCol= new cTipImg ("blockVisCol"); tipImgVisCol.set (TIP_VIS_COL);

Example b) Advanced HTML Tip
var TIP_FILTER_ADV= "<br>" + "<table class='tip' BORDER='3' cellspacing='0' cellpadding='2'>" +
....... ; // HTML Tip Definition
var tipImgFilterAdv= new cTipImg ("blockFilterAdv"); tipImgFilterAdv.set (TIP_FILTER_ADV);

3) Prompt with automatic TextTip generation
CValuePrompt CEL Class is an extension of Cognos Value Prompt adding to Cognos features this advanced Tip functionality: each time that the User change the selection in the Prompt, the Tip is updated to show the current number of item selected and the relative Status comparing to constraints (Red color if contraints are not respected):
//-------------- ValuePrompt [0..10] with Tip for FilterCategory: var promptCategory = new cValuePrompt ("FilterCategory",false); promptCategory.setSelRange(0, 10); promptCategory.tipTxtCreate(true);
Example: the Red TextTip "Selected 11 of 16 - Valid Range=[0..10]" is displayed:

Comments