COGNOiSe.com - The IBM Cognos Community

General Discussion => Wishlist => Topic started by: Merri on 17 Aug 2005 05:31:18 PM

Title: ReportNet wishlist
Post by: Merri on 17 Aug 2005 05:31:18 PM
Here's one:

The ability to rotate text in column headings to any angle
Title: Re: ReportNet wishlist
Post by: Darek on 19 Aug 2005 06:29:47 AM
First you would have to convince them ...  http://www.w3.org/
Title: Re: ReportNet wishlist
Post by: CoginAustin on 19 Aug 2005 08:01:54 AM
CSS works to rotate text.


<div style="layout-flow: vertical-ideographic">

Column Header Field
</div>

Also DHTML can rotate text on all axis..
Title: Re: ReportNet wishlist
Post by: Darek on 19 Aug 2005 08:03:11 AM
At "ANY" angle ?
Title: Re: ReportNet wishlist
Post by: CoginAustin on 19 Aug 2005 08:58:12 AM
You can rotate to any angle. However, it must be absolutely positioned and it would take extra real estate(vertcal length+horizontal length) since the actually column do not display at the same angle. With this in mind you will also have to adjust the column height and width manually as the text is basically not part of that cell. I have no idea what issues there are as far as printing.

Another easier way to go about it is to just create a .gif of the text at the angle you want  ;D

Real estate required:

*Vertical text
abcdefg

*Horizontal
a
b
c
d
e
f
g

Diagonal
a
b
  c
   d
     e
      f
       g





To do it:


<STYLE>
.positioned { position: relative; }
</STYLE>
<SCRIPT>
var id = 0;
function displayTextDiagonal (text, down, deg, lsp) {
  deg = deg || 45;
  deg = Math.PI / 180 * deg;
  lsp = lsp || 10;
  dy = lsp * Math.tan(deg);
  var html = '';
  html += '<DIV ID="td' + id + '"' + ' CLASS="positioned"' + '>';
  if (down) {
    for (var r = 0; r < text.length; r++) {
      html += '<SPAN ID="td' + id + r
             + '" CLASS="positioned" STYLE="left: '
             + (r * lsp) + 'px; top: ' + (r * dy) + 'px;">';
      html += text.charAt(r);
      html += '</SPAN>';
    }
  }
  else {
    for (var r = 0; r < text.length; r++) {
      html += '<SPAN ID="td' + id + r
              + '" CLASS="positioned" STYLE="left: '
              + (r * lsp) + 'px; top: '
              + ((text.length - r) * dy) + 'px;">';
      html += text.charAt(r);
      html += '</SPAN>';
    }
  }
  html += '<\/DIV>';
  id++;
  document.write(html);
}
</SCRIPT>
<SCRIPT>
displayTextDiagonal('Column Heading', true, 45);
</SCRIPT>
Title: Re: ReportNet wishlist
Post by: Merri on 01 Sep 2005 04:05:38 PM
"Any" angle was a big ask, I know. Personally, I'd be happy with 90deg anti-clockwise. Currently I can only get 90deg clockwise. I raised this with Cognos and they've created an enhancement request.

With my user hat on, I can see how it would be easier to read at a more acute angle such as
45 or 60; the sort of thing you can do in Excel (much as I hate the beast, it does have good layout options). Granted it does take up more real estate. And I was also thinking that this should be EASY for non-technie authors to implement - which tends to rule out workarounds heavy on the scripting and graphics manipulation.

But I will try the suggested css option & see if that helps - thanks, guys!
Title: Re: ReportNet wishlist
Post by: wneuman on 28 Apr 2008 02:22:36 PM
Here's another one - How about a Gantt Chart format without having to buy a third party application?