Discussions
Categories
Groups
Community Home
Categories
INTERNAL ENABLEMENT
POPULAR
PUBLIC CLOUD
PRIVATE CLOUD
Quick Links
MY LINKS
HELPFUL TIPS
Back to website
Home
Intelligence (Analytics)
Traversing IRow
uzilan
Hi,
Is there any way to traverse through the elements of an IRow? I'm writing a script that replaces the titles of each column in a table. By overriding RowEventAdapter.onPrepare() I get an instance of IRow, and would like to iterate through the columns and change their contents. But IRow does not have any method to retrieve it's columns. Is there any other way to achieve that?
(Using Birt 2.6.0)
Thanks, /U
ps. btw looking at IColumn, I can't see a way to retrieve it's text component. How do I get hold of it?
Find more posts tagged with
Comments
mwilliams
Hi U,
What are you changing the column names for? Just for appearance in the report? Or for some other reason?
uzilan
Hi,
We're using a strange content system and we figured that the easiest way to use it is to enter keys as column names in the report and to attach an EventAdapter which fetches these keys and replaces them with real content from the content system. Using traditional i18n bundles is unfortunately out of the question.
/u
mwilliams
So, if you could just change the displayed column names in the report, that'd be good enough?
uzilan
Yeah, thats just what we want. But I need a way to call the content system, which is why we tried using the event adapter. Is there a better way?
/U
mwilliams
You should be able to use the onCreate event of the column labels to check the value and change it there as long as you have access to your decode list of what you actually want the column named.
uzilan
Yeah sure, I could add an event listener to every column text element, but I thought it would be easier if I could just add a listener to the whole table or to the header row and then traverse through the columns - we have a lot of tables with many columns and it would save us some work.
But never mind it. Thanks for your help anyway.
/U
mwilliams
U,
I have tried many things to get to change the column label in either the row or table script, but with no success. There is an option in the dataSet output column section for a "display value key". I have not used this before and it is greyed out for me, but it might be worth investigating.