COGNOiSe.com - The IBM Cognos Community

IBM Cognos 8 Platform => COGNOS 8 => Report Studio => Topic started by: bioCam on 07 Aug 2010 06:46:36 PM

Title: Create '[more]...' link in a report to display the full description
Post by: bioCam on 07 Aug 2010 06:46:36 PM
Hello,

I have to display the first 25 characters of a Complaint Description data item in my list report followed by a link '[more]...' so the user can click on to display the full description which could be a new pop-up window.

I have been researching quite a bit but I am not finding any solution close to what I need to achieve :(.  I thought of using a tooltip which I tried but then I am not sure the maximum of characters it can handle.  The Complaint Description I was told could be several hundreds character long.  I don't have real data but I am going to test it out using static text for now.

Do you have any suggestion what is typically done in a report that has such a requirement? 

Thank you.
Title: Re: Create '[more]...' link in a report to display the full description
Post by: CognosPaul on 08 Aug 2010 02:30:56 AM
There are a number of ways to achieve to what your trying to do.

One of the reports I've made uses a drillthrough to a comment data entry/history page. Every row has a 'comments' cell. Hovering over it displays the popup (latest comment) while clicking it opens the comments page in a new window.

I've also used something similar to this (http://forums.asp.net/p/1198710/2080283.aspx') method for creating stylized tooltips. To the best of my knowledge there is no limit on the number of characters. Certainly more than a thousand. The benefit of using a custom tooltip is you can pretty it up to match the look and feel of your report. You can also easily modify the javascript to add images.
Title: Re: Create '[more]...' link in a report to display the full description
Post by: bioCam on 08 Aug 2010 06:22:27 AM
Thank you PaulM.

One of your reports with drillthrough ...
1)  The hovering over to display a popup - is this a tooltip?
2)  The 'comments' cell has a drill through so that when click on will open a new window with comments.

The requirement from the client is to open a new window.  I think I would go with the stylized tooltips and if they still want a new window, I can make the cell a drill through.

Thank you so much for your help.  :)  :)
Title: Re: Create '[more]...' link in a report to display the full description
Post by: CognosPaul on 09 Aug 2010 03:58:29 PM
The popup I was referring to was a stylized tooltip. onmouseover the javascript would populate a span with a string, and would position:absolute it to the right place then finally display:block. It seems that normal tooltips, made with the title attribute, have browser dependent max lengths.

Glad to be of help!