Discussions
Categories
Groups
Community Home
Categories
INTERNAL ENABLEMENT
POPULAR
THRUST SERVICES & TOOLS
CLOUD EDITIONS
Quick Links
MY LINKS
HELPFUL TIPS
Back to website
Home
Intelligence (Analytics)
Hiding/showing rows depending on whether certain IDs are contained in an array.
AlbertYu
Hello,
I am trying to hide rows on a table, depending on whether certain IDs are contained in an array (BIArray):
for (r=0; r<BIArray.length; r++)
{
if (BIArray[r]==this.getRowData().getColumnValue("BI_CompID"))
{
ShowRow=true;
break;
} else
{
ShowRow=false;
}
}
(this code is on the table's detail row's onCreate method).
As you can see, if BI_CompID's value is the same as a value in the array, then I want to show the current row in question, otherwise, I want to hide it.
ShowRow is currently used in the detail row's "Visbility" property, which is set to:
- Hide Element = checked
- For all outputs = option selected
- Detail (All Outputs) set to: ShowRow==false
This method works for most values. However, there are some values that are showing that shouldn't be showing. So this method in its current implementation doesn't work perfectly.
I was thinking, perhaps there is a better of doing this?
Perhaps I can hide the row on the table's detail row's onRender method? If so, what is the JavaScript command for this?
Thanks,
Albert
Find more posts tagged with
Comments
AlbertYu
By the way, my BIRT version is 2.6.2.
Regards,
Albert
mwilliams
If you're seeing some that you're supposed to be hiding, are you not seeing some you're supposed to be showing, as well? Or are there too many to tell? It could be possible that you're hiding the next row, which is why some show and some don't. Why not do your entire expression in the visibility expression?
AlbertYu
<blockquote class='ipsBlockquote' data-author="'mwilliams'" data-cid="108507" data-time="1344948946" data-date="14 August 2012 - 05:55 AM"><p>
If you're seeing some that you're supposed to be hiding, are you not seeing some you're supposed to be showing, as well? Or are there too many to tell? It could be possible that you're hiding the next row, which is why some show and some don't. Why not do your entire expression in the visibility expression?<br /></p></blockquote>
<br />
<br />
Thanks Michael. That idea worked.<br />
<br />
My colleague implemented the code in the visibility expression and it worked.<br />
<br />
<br />
Thank you,<br />
<br />
Albert