zen report pdf hide table completely when data rows is empty
Hello
How to hide a table completely in pdf generation when a row is empty?
A table has style with borders
<table group="services" removeEmpty="1" style="border:1px solid black;">
<item field="TotalSum" suppressEmpty="1" />
<item field="TotalAvSum" suppressEmpty="1" />
</table>
With removeEmpty="1" and suppressEmpty="1" all data are hidden when a row is empty but top and bottom borders are remain on the page.
How to hide also table's top and bottom borders when a data row is empty?
Comments
Hi Ruslan,
something like
<table ifxpath="TotalSum!=""" [...]
might do the trick.
Thanks very much
removeEmpty is defined as
The <table> removeEmpty attribute controls whether or not the empty nodes that Zen encounters in the XML data for this report display in the XHTML or PDF output generated by this <table> in the report. If removeEmpty is:
- Not specified, the <table> inherits the removeEmpty value of its parent. If no element in the ancestry of this <table> specifies a removeEmpty value, then the default value, 0, applies to this <table>.
- 0, empty element and attribute values are output to the XHTML or PDF generated for this <table> in the report.
- 1, empty element and attribute values are not output to the XHTML or PDF generated for this <table> in the report. If orient is "row," any rows with all empty data values are omitted from the output. If orient is "col," any columns with all empty data values are omitted from the output. If there are some empty cells, but the entire row (or column) is not empty, then the row (or column) is displayed with the empty cells blank.
The group attribute must be set for removeEmpty to work.
This attribute has the underlying data type %ZEN.Datatype.booleanOpens in a new tab. See “Zen Reports Attribute Data Types.”
so I dont think removeEmpty addresses what you have asked. I would consider using an
ifxpath expression that would control whether or not to display the table