|
Re: Highlights for one Row in bevorFactory script [message #546364 is a reply to message #546294] |
Mon, 12 July 2010 14:26 |
|
To get a detail row with the table handle you should be able to use:
tabledetail = th.getDetail( ).get( 0 );
If you have more than one detail just increment the get:
tabledetail = th.getDetail( ).get( 1 );
If you set an elementid you can also always use:
reportContext.getDesignHandle().getElementByID(idofitem)
Jason
On 7/12/2010 8:11 AM, pigargo wrote:
> 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.03505 seconds