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

Formatted Tooltips in a Dashboard

Started by gordread, 29 May 2014 04:13:17 PM

Previous topic - Next topic

gordread

This is going to be a long one, as I want to make sure that I'm supplying all pertinent information.

In a nutshell, I am helping to build a Dashboard, and have been tasked with building the formatted tooltips for each of the four reports on the main page of the dashboard.  I have done this using HTML and jQuery/Javascript.  Which works perfectly as designed, until I put it into the Cognos reports, then the 'position' is all messed up.

Overlap.html is the html (including the jQuery) that I am using.  At this point it is completely self contained.

Since I can only upload one attachment, I thought I would just keep it as the HTML, and describe what I am seeing in Cognos when I run the report. 

Essentially, I have located the 'i' next to the report element that I want to display information about.  However, instead of the 'tooltip' displaying at the location of the mouse cursor, it is displaying somewhat (about 150px) below the mouse cursor.  I can get the position to change, by adding or subtracting pixels in the javascript.  However, in the basic HTML (without Cognos wrapped around it) the code makes the 'tooltip' appear exactly at the point of the mouse cursor.

Therefore, there is something in Cognos that is pushing the coordinates.

Any thoughts or assistance would be very welcome.

Gordon


CognosPaul

I've had similar issues in the past. It boils down to quirks in the positioning system when dealing with absolute and fixed positions. So you can find the correct position, but it will be offset when rendered inside.

The coords are calculated by looping up from the current position to the very top. The solution that I found, unfortunately I don't have on me, was to stop during the loop-up at a specific element, I think form element (but my memory is like a sieve).

Calendar prompts are actually rendered outside the form element - which is why it's so easy for them to be placed pixel perfect.

gordread

Thank you for replying.  If you find more details on the solution, I'd love to hear about it.  For now I have just re positioned the 'tooltip' in relation to the window in which it will be displayed.  As that is the only window it will be in, that should be fine, just not very elegant.

Gordon