Get element by ID
Options
Comments
-
<pre class='_prettyXprint _lang-auto _linenums:0'>reportContext.getDesignHandle().getElementByID(201)</pre>
<br />
Read all about this here <a class='bbc_url' href='http://www.eclipse.org/birt/phoenix/deploy/reportScripting.php'>Report Scripting</a>0 -
Thanks for the hint. But I still have problems making it work
use the statement
reportContext.getDesignHandle().getElementByID(609).text = "my text"
but that didnt work. I suppose the element handle is obtained correctly but the text property is not set.
Any more thoughts on this?
Thanks,
Adil0 -
in which element you are writing this statement and in which method..please explain0
-
<blockquote class='ipsBlockquote' data-author="'adilb'" data-cid="52772" data-time="1251040935" data-date="23 August 2009 - 08:22 AM"><p>
Hi All,<br />
<br />
<br />
I want to get a reference to a report element via its ID. In javascript that would be done via <br />
<br />
<br />
document.getElementById("myElemenentId").text="mytext";<br />
<br />
<br />
Is there anything similar in birt script?<br />
<br />
<br />
Regards,<br />
<br />
<br />
Adil<br /></p></blockquote>
<br />
You can do this a few ways<br />
<br />
<pre class='_prettyXprint _lang-auto _linenums:0'>
reportContext.getDesignHandle().findElement("myElementId").text = "test"
</pre>
<br />
If you labeled it, if you know the ID number you can use the following<br />
<br />
<pre class='_prettyXprint _lang-auto _linenums:0'>
reportContext.getDesignHandle().getElementByID(74).text = "Test"
</pre>
<br />
Where 74 is the ID numberWarning No formatter is installed for the format ipb0 -
Hi,
In my report I need to set the content in master page footer based on the element Id. I have three sections in my report and each section has table element and I must ensure that a section always starts on a new page (page break).
Also the master page footer content varies for each section, so how do I change the content for each section in master page footer?
section1(in page 1): Header(some logo)
Table
Footer ("some test for example: Test A")
section2(in page 2): Header(some logo)
Table
Footer ("some test for example: Test B")
section3(in page 3): Header(some logo)
Table
Footer ("some test for example: Test c")0
Categories
- All Categories
- 109 Developer Announcements
- 49 Articles
- 100 General Questions
- 122 IM Services
- 40 OpenText Hackathon
- 31 Developer Tools
- 20.6K Analytics
- 4.1K AppWorks
- 8.9K Extended ECM
- 897 Cloud Fax and Notifications
- 77 Digital Asset Management
- 9.3K Documentum
- 29 eDOCS
- 122 Exstream
- 39.8K TeamSite
- 1.7K Web Experience Management