Discussions
Categories
Groups
Community Home
Categories
INTERNAL ENABLEMENT
POPULAR
PUBLIC CLOUD
PRIVATE CLOUD
Quick Links
MY LINKS
HELPFUL TIPS
Back to website
Home
Intelligence (Analytics)
Display character limit + Freeze header on table
dragosss24
Hello,
I would like your help. I have a table with lots of columns. One of columns has a data cell with comments (string). These comments are sometimes very long. I want to limit the chracters displayed to a max of 20 and on mose over to be displayed all the string. It is possible?
And the second problem - It's a bout the same table. It returns many rows. Is there a any chance to freeze the header on scrool down?
I'm using 3.6.1 platform on eclipse.
Thank you in advance for your answers.
Find more posts tagged with
Comments
kclark
You can use a dynamic text object in your table to truncate the comments and use helpText instead of the onMouseOver(). I've attached an example for you to take a look at. I dragged over a dynamic text into my table and used "" as the expression so BIRT wouldn't give me an error. Then I used this script in the onCreate() of the dynamic text.<br />
<br />
<pre class='_prettyXprint _lang-auto _linenums:0'>var allText = row["CUSTOMERNAME"];
var tuncText = allText.substring(0,3);
this.text = tuncText;
this.helpText = allText;</pre>
<br />
I used substring to truncate the string. I used a length of 3, but you can adjust this to 20 so it meets your needs. If you hover over the rows it will show the full string in the helpText.
kclark
To fix the header on your table you can put the table in a grid with two rows and one column, set the height of the grid, and set the overflow to scroll. Then you can put the header information in row one of the grid.
julia.a
<p>Hi kclark,</p><p>the idea to "freeze" the table using [color=rgb(40,40,40);font-family:helvetica, arial, sans-serif;]grid with [/color][color=rgb(40,40,40);font-family:helvetica, arial, sans-serif;]scroll[/color][color=rgb(40,40,40);font-family:helvetica, arial, sans-serif;] overflow seems to work only for tables but not for cross tab? im i right?[/color]</p><p>[color=rgb(40,40,40);font-family:helvetica, arial, sans-serif;]I just tried it, and it didn't work for my cross tab but for a table. [/color]</p><p>[color=rgb(40,40,40);font-family:helvetica, arial, sans-serif;]Do you have any tip how to reach it for a cross tab? thank you![/color]</p>