In my regular tables I have simple up/down arrow images and use a oncreate script to display an onhover helptext. IE :
this.helpText = "Revenue UP from last year : " + this.getRowData().getColumnValue("ly_revenue") + " $ ";
However I can't really find a way to do this when using a crosstab. I have the aggregate values in the crosstab, but if i try to refrence them the same as that I get :
Cannot call method "getColumnValue" of null
Are you trying to set the help text of the crosstab or set the help text of another object using a value in the crosstab? If you're trying to set the help text of the crosstab you could use something like this in onCreate()
I'm trying to set the helptext value of an image inside the crosstab. So each column/group in the crosstab has some up/down arrow images, i want a helptext/onhover for them that display a (hidden) value in the crosstab.
So i dont think this.getValue(); is going to work since the image i'm applying it to doesn't have a value.
I just dont know how to refer to a value in a crosstab, since it doesn't have the traditional table `this.getRowData().getColumnValue("some_value")` designation.
This is the first time I've played with crosstabs in Birt so excuse if this is a newbish question.
Thanks! As i was building the sample report I actually figured it out.
I've always used this.getRowData().getColumnValue() to get a value in an onCreate script for helptext.. However you don't need to, you can simply say "row". So either of these two examples work on a regular table :
this.helpText = "Revenue UP from last year : " + this.getRowData().getColumnValue("ly_revenue");
this.helpText = "Revenue UP from last year : " + row["ly_revenue"];
However only the latter one will work in a crosstab.
Much easier then the only other way idea I had, building some data element to figured the avlue and set it to a variable then call that in the oncreate script or build it in a html text element.