Skip to main content



      Home
Home » Archived » BIRT » JS-Scriptiing: What exacly does Row.rowData.getExpressionValue() do?
JS-Scriptiing: What exacly does Row.rowData.getExpressionValue() do? [message #134812] Thu, 23 February 2006 01:43 Go to next message
Eclipse UserFriend
Originally posted by: juergen.schwarz.gefasoft.de

I try to use rowData.getExpressionValue() in the Row of a Table to get
the data of the Dataset. But this function seems to give strange results
and not the data.
Any explanations what this function really does? Or how I can get the
data of my Dataset?
Is there any documentation about the availabe classes and their methods
that can be used for scripting? I have the BIRT Designer help but this
doesn't really help...
Re: JS-Scriptiing: What exacly does Row.rowData.getExpressionValue() do? [message #136121 is a reply to message #134812] Fri, 24 February 2006 19:37 Go to previous message
Eclipse UserFriend
rowData.getExpressionValue(int) should give you the value of the expression
in the i:th column in your table.
rowData.getExpressionValue("some_expression") should give you the value of
the provided expression for the row (need to be a defined column expression
on the table).

Examples:

Table(2 columns):
row["product"] | row["price"]

Result:

product1 | $20
product2 | $30

Script on row.onCreate:
if (this.rowData.getExpressionValue(1) == "product1")
this.getStyle().backgroundColor = "red";

if (this.rowData.getExpressionValue("row[price]") == "$20")
this.getStyle().backgroundColor = "blue";

Result of script:

First row should be red, second row should be blue.

Remember that the the expressions are the one defined on the table, not the
dataset. So if a table has the following expression: row["price"]/100, the
following if ok:
rowData.getExpressionValue("row[price]/100")
but this is not:
rowData.getExpressionValue("row[price]")

Hope this helps,
Petter Ivmark

"Juergen Schwarz" <juergen.schwarz@gefasoft.de> wrote in message
news:dtjlip$56g$1@utils.eclipse.org...
>I try to use rowData.getExpressionValue() in the Row of a Table to get the
>data of the Dataset. But this function seems to give strange results and
>not the data.
> Any explanations what this function really does? Or how I can get the data
> of my Dataset?
> Is there any documentation about the availabe classes and their methods
> that can be used for scripting? I have the BIRT Designer help but this
> doesn't really help...
Previous Topic:Is there a setStyle for a report elements?
Next Topic:CSV without veiwer?
Goto Forum:
  


Current Time: Wed Jul 16 18:34:31 EDT 2025

Powered by FUDForum. Page generated in 0.03536 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top