Discussions
Categories
Choose a Product
THRUST SERVICES
CORE APPS
CE PRODUCTS
...
Quick Links
POPULAR
HELPFUL TIPS
Groups
My Links
FOR SIGNED IN MEMBERS:
Back to website
Home
Designing Analytics Reports
Retrieving style properties at runtime
Migrateduser
Hi,<br />
<br />
I was wondering if it is possible to retrieve certain style properties of a report element at runtime which are not defined by the item itself but are passed on to the element by its parents.<br />
The only way I found was using a while-loop to walk up the element-tree to find the style instance that defines the required property:<br />
<br />
<pre class='_prettyXprint _lang-auto _linenums:0'>
IScriptStyle style = null;
IReportElementInstance parent = <currentElement>;
while (parent != null && parent.getStyle().getFontFamily() == null) {
parent = parent.getParent();
}
String fontFamily = parent.getStyle().getFontFamily();
</pre>
<br />
It does do the trick but is somewhat tedious to implement and I was wondering if there exists an easier way to do this.<br />
<br />
Lukas
Find more posts tagged with
Comments
There are no comments yet