Highlights for one Row in bevorFactory script [message #546294] |
Mon, 12 July 2010 08:11  |
Eclipse User |
|
|
|
Hello,
I am using the following script to generate variable highlightrules:
importPackage(Packages.org.eclipse.birt.report.model.api);
importPackage(Packages.org.eclipse.birt.report.model.api.ele ments);
importPackage(Packages.org.eclipse.birt.report.model.api.ele ments.structures);
var th = reportContext.getDesignHandle().findElement("mytable");
var ch = th.getColumns().get(0);
var hr = StructureFactory.createHighlightRule();
for(jj=6; jj<= 20; jj++ ){
hr.setOperator(DesignChoiceConstants.MAP_OPERATOR_EQ);
hr.setTestExpression("row[\"MYSIZE\"]");
hr.setValue1(jj);
hr.setProperty(HighlightRule.FONT_SIZE_MEMBER, jj+"pt");
var ph = ch.getPropertyHandle(StyleHandle.HIGHLIGHT_RULES_PROP);
ph.addItem(hr);
}
If I set the findElement to mytable all will be fine. But in mytable there are 2 rows an I only want to set the highlights for on row. How can I set the findElement to get only my row1? I tried it in many ways but they all end with an error, because my row has no name (it's not possible to set a name for a row) and to send the Element-ID for the findElement function gives also an error.
pigargo
|
|
|
|
|
Powered by
FUDForum. Page generated in 0.10238 seconds