Hiding Columns based on a Data Field value

This entry guides you through the steps on hiding of empty columns using RenderIf scripting.


Scenario:

  • Hide the column “sample” if there is no value.

Initial Output:

image

1/ RML template is configured as follows: (Section Header = Label) (Detail = Data Field)
image

2/ Click on the “Section Header” band and tick the checkbox for “Can Shrink” & “Can Grow”.
image

3/ Next, click on the cell containing the “sample” label and configure the properties as shown below:
image

4/ Repeat Steps 2 & 3 for the “Detail” band.

5/ Save the RML template and render the RML template.

Output:
image