0

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

Eyei
  • 1
  • 4

1 Answers1

0

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

d r
  • 3,848
  • 2
  • 4
  • 15
  • Thanks for this it worked. But now I used dynamic data column, but the generated output has blank fields and the table become broken. This is my sample xml data structure. – Eyei Dec 11 '22 at 06:23
  • 1ST COLUMN HEADER Value Date 1st field for each VALUE_DATE – Eyei Dec 11 '22 at 06:27
  • 2ND COLUMN HEADER for each ELEMENT_NAME end for-each – Eyei Dec 11 '22 at 06:28
  • 2ND FIELD for each 0 RESULT_VALUE end for-each end for-each – Eyei Dec 11 '22 at 06:29
  • the above rtf code, worked but the table became broken (or blank fields with table broken) in case the element name is not present – Eyei Dec 11 '22 at 06:31
  • It is hard to tell without sample xml, rtf coding and result, but, it seems like you have to handle the existance of the node ELEMENT_NAME and/or the value of it. The code "if:not(ELEMENT_NAME)?> 0" means if ELEMENT_NAME is not greater than 0 then .... something - in this case (if I got it right) the NULL or '' empty string or non existing ELEMENT_NAME is not greater than 0. Make sure that there is an ELEMENT_NAME present and then handle the value of it. – d r Dec 11 '22 at 07:34
  • Check this https://gist.github.com/ijy/6572634 – d r Dec 11 '22 at 07:38
  • This is the sample xml result – Eyei Dec 12 '22 at 09:18
  • https://github.com/Feyifey/Xml-sample/blob/main/Sample%20actual%20xml – Eyei Dec 12 '22 at 09:18