Run Time Element Formatting [message #713515] |
Mon, 08 August 2011 10:56  |
Eclipse User |
|
|
|
Dear All,
I am a newbie to BIRT and I am just getting in touch with the power of scripting..
According to explanations provided by Jason Weathersby (thanks a lot), i have been able to include the following script in the BeforeFactory event of the report:
[i]tcell = header.getCells( ).get( i );
label = elementFactory.newLabel( null );
label.setText(columnHeaderArray);//$NON-NLS-1$
tcell.getContent( ).add( label );
As a result, a header of labels are created successfully depending on the number of columns i pass in the parameter.
The question here is how to set styles to the labels newly created. After digging in the forum, the closest i could come up with was a code like:
reportContext.getDesignHandle().findelement("mylabel").setstyleName("highlight-orange");
Unfortunately, my labels do not have names and i am not so familiar with the methods of label objects. Is there any where i could get some documentation or recommendations about how to change these objects in run-time?
Any help would be greatly welcomed...
Thanking you in advance,
Karvesh
|
|
|
|
|
Powered by
FUDForum. Page generated in 0.04551 seconds