Eyei
Eyei

Reputation: 1

How to conditionally hide a column in rtf template when 0 value

I need to hide the whole column in the rtf template when the value is equal to '0' then it needs to be shown when the value is greater than '0'

I have tried the ff. But none of them worked. Sol#1 Column Header <if@column:COLUMNAME="0"?>

Cell <if@column:../../COLUMNAME="0"?>

Sol#2 Column Header <if@column:contains(COLUMNAME, '0')?>COLUMNHEADERNAME>

Cell <if@cell:contains(COLUMNAME, '0')?>

Sol#3 Column Header <if@column:/COLUMNAME/@type="PRIVATE"?>

Cell <if@column:/COLUMNAME/@type="PRIVATE"?>

Here' sample template output, the highlighted in yellow should be hided. enter image description here

Upvotes: 0

Views: 8409

Answers (1)

d r
d r

Reputation: 7846

Conditional Column:

  • you should put the If condition for the column label and for the column value
    1.Place your cursor infront of the label
    2.Click "Conditional Region" on BI Publisher Tab
    3.Clik "Advanced" tab on Dialog window
    4.Write your condition:
<?if@column:YOUR_COLUMN>0?>
  1. Click OK - There wil be "C" and "EC" marks
  • If you select and doubleclick on "C" you should see your condition on BI Publisher Properties dialog
  • If "EC" is in next column it should work anyway but I like to cut - paste it at the end of label and of value like in the picture
  1. Do the same for your column value enter image description here

More about it here (find "@column" on page)
Regards...
Addition:
with your xml data - the outcome depends on your deffinition of groups. Below find two different tables based on same data with group definitions.

enter image description here ... here is the result: enter image description here

Upvotes: 0

Related Questions