If you are unable to create a new account, please email support@bspsoftware.com

 

News:

MetaManager - Administrative Tools for IBM Cognos
Pricing starting at $2,100
Download Now    Learn More

Main Menu

Is there way to show tool tip in cognos viewer

Started by coghelp, 16 Jun 2010 12:27:43 AM

Previous topic - Next topic

coghelp

When user place mouse on some field in Cognos viewer can we show some tool tip? Is it possible?

CognosPaul

Certainly.

The thing to remember is that, when you view the report in HTML, it is essentially a web page. Anything you can do in a webpage you can do in an HTML report. There are some people who take it to the extent where they adhere to certain standards (seperate CSS file, seperate Javascript file, working primarily with DIVs and ULs, and so on).

Standard tooltips are created with the title attribute in div or span (or whatever) tags. You can insert DIV tags with the HTML Item from the toolbox. It then follows that you can create tooltips where ever you can insert HTML Items.

Let's take a simple list report. The requirement being a list of products with a tooltip being their code.

Create a query with the Product Name and the Code.
With that query create a list containing only Product Name. Put the code in the properties of the list (to force it in the generated SQL)
Unlock the report and drag an HTML Item to the left of the <Product Name> in the list.
Leave the source as Text and put <span title="test"> into the HTML (we'll test the report to make sure it works before using real data).
Drag another HTML to the right of the <Product Name>
Leave the source as Text and put </span> into the HTML.

If all goes well when you run the report you should get "test" as the tooltip for each item.

Merging this with live data is just as easy.

In the HTML item to the left of the field change it to <span title=" drag in another HTML item to the right of that (between that one and the <Product Name>) and set the source to Data Item Value. Select the code as the Data Item Value. Finally drag yet another HTML item to the right of that one, source is Text, and HTML is ">.

Run the report. You should see the code for every product. I recommend looking at the generated HTML to see exactly what it's doing.

There are also various other methods for creating tooltips. You can make stylized multiline tooltips with Javascript for instance. But I'll leave that one to you.

vvasireddy9