RTF Template Enhancement – Hide Column When Total Equals Zero
I need to apply a condition in the RTF template to hide an entire column only when the total value of that column equals zero. However, if the column contains any non-zero values (even if some rows include zeros), the column should remain visible without causing any layout shifting or misalignment in the table.
I used this condition :
<?if@cell :sum(.//ANNUAL_LEAVE)!=0?>Annual leave<?end if?> -- header in the header i used @column and the same result.
<?if@cell :sum(.//ANNUAL_LEAVE)!=0?> <?ANNUAL_LEAVE?> <?end if?> --middle
<?if@cell :sum(.//ANNUAL_LEAVE)!=0?> <?sum(ANNUAL_LEAVE)?> <?end if?> --bottom
Tagged:
0