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)
Visibility Property
AbbyNL
BIRT 2.1.2
Report Outline
--Body
--Table
-- +Row
-- +Row
-- -Row <<<
-- -Cell
-- +Grid
On the ROW element's Visibility property should allow me hide this element based on the condition:
((BirtComp.notEqual(row["status"], "QUEUED")==1) ||
(BirtComp.notEqual(row["status"], "SUBMITTED")==1))
I've tried all iterations of the above statement and nothing. I've also tried to use the Visibility property on the Row also and the property does not respond.
The row does not display regardless of the Visibility Property. The "Hiding Elements" documentation does not make it seem any more complicated than this. Am I missing something? Anyone played with this property? Does anyone read/answer these posts?
Find more posts tagged with
Comments
bhanley
The expression you enter in the Visibilty property should specify when you want the element hidden. So in your example, you want to hide the rows with a status not equal to "Queued" or "Submitted"<br />
<br />
<blockquote class='ipsBlockquote' ><p>((BirtComp.notEqual(row["status"], "QUEUED")==1) || (BirtComp.notEqual(row["status"], "SUBMITTED")==1))</p></blockquote>
<br />
One issue I see is that BirtComp.notEqual returns a boolean, so instead of looking for a return of 1, just modify it to look like this:<br />
<br />
<pre class='_prettyXprint _lang-auto _linenums:0'>(BirtComp.notEqual(row["status"], "QUEUED") || BirtComp.notEqual(row["status"], "SUBMITTED"))</pre>
<br />
I have attached an example that hides an entire row in a table based on a toggle of the visibility property via an expression. Using the report as-is will hide all products in the "<strong class='bbc'><em class='bbc'>Motorcycles</em></strong>" product line. Hopefully that will help you along.<br />
<br />
Sample is built on BIRT 2.3 using Classic Models sample data so you should be all set to run this as-is.<br />
<br />
Good Luck!
AbbyNL
Thank you for your response Brian. I reviewed the example you sent and tried again to figure out why the Visibility Property is not working for me. Things I tried:
* moving the condition to a single line in the Expression Builder
* making the change to the boolean expression you suggested
* moved the Visibility Property expression from the Row level of the table to the Grid. The Cell element of the Table Row does not contain a Visibility Property.
* Instead of using the BirtComp.notEqual function I tried using != as the operator.
* I changed the call to the "status" data to rows[0]["status"] instead of the value put into the Expression Builder from a double click on Available Column Bindings
None of these processes worked. I guess I could take it to the cell level of the grid, but what a pain. The table element in which I am attempting to hide a Row element has cell level Visibility Property applied in different rows and they are working properly.
bhanley
Can you clarify for me exactly what you are trying to hide? I took your inital post to indicate you were trying to hide an entire row based on the value in a cell of that row (which is what the example I attached does). After reading your latest post I am not sure.