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)
Extract Label from .rpt file
cassy
Hi,<br />
<br />
I have problem displaying label's content created in a table cell. I have a few tables and grids in the report. I'm able to extract the data set and display it in a java text area but i'm stuck in the label for quite a long time.<br />
<br />
The first method (extractGrid) is to check the grid if the next cell is a table, grid, data or label. I have method handling labels named extraxtLabel. The method is as follows:<br />
<br />
<pre class='_prettyXprint _lang-auto _linenums:0'>
private static void extractGrid(GridHandle grid){
...
if(elementHandle.getClass().equals(LabelHandle.class)){
LabelHandle lbl = (LabelHandle) elementHandle;
extractLabel(lbl);
}
private static void extractLabel(LabelHandle lbl){
try{
if(lbl.getText() != null){
if(lbl.getElement().equals("text-property")){
System.out.println("Label Name: " + lbl.getText());
}
}
}catch (Exception e){
e.printStackTrace();
}
}
</pre>
<br />
Whenever i run my code, other information can be displayed correctly but only the labels appears blank. I am relatively new to BIRT, so please let me know if I am following the correct approach. If yes, what am I missing here.<br />
<br />
Thanks!<br />
<br />
Regards,<br />
Cassy
Find more posts tagged with
Comments
There are no comments yet