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)
How to change label text depending on DataSet value?
griniland
<p>Very new with a Birt, so don't be angry with such a dumb question.</p><p>Actually, I went almost crazy - whole day trying and sucking the result.</p><p>NB!: please, don't offer Dynamic Text to me - it suits, but not perfect ( I've got dozen+ fields and I don't want to write expressions for each one of them).</p><p> </p><p>I've got a report form (simple Grid) and several labels with text to be replaced depending on DataSet retrieved values.</p><p>Problem is that I want to use a function, which I placed into Report.initialize() event - that changes labels dynamically depending on argument I passed to it.</p><p>It works fine beeing test-called, for example, from Report.beforeRender() event, but not from DataSet.onFetch event (when I know the values I need to pass). </p><p> </p><p>Here is my function, that I try to use to cope with this task:</p><p> </p><p>function setTextLabels ( changeCriteria )</p><p>{</p><p> </p><p> reportContext.getDesingHandle().findElement("Label to replace").setText("This text I want to see instead old one");</p><p> </p><p>}</p><p> </p><p> </p><p> </p><p>Could You please help me deal with this Angry Birt ? ))</p>
Find more posts tagged with
Comments
Hans_vd
<p>A much easier way to do this, is putting 2 labels on the report and write a visibility expression based for both of them.</p>