Is it possible to hide tables in documents if they are empty ?
I am creating a document for a scheme where the question set is essentially made up of a number of tables.
On the quote/schedule I do not want to show the tables/table headers if there is no data entered in the table. I just cannot find a way of doing it. If you need details on the scheme and doc just give me a shout.
Thank you
Natalie
-
I think you may be able use an "IF" to achieve this?
try looking here. http://wiki.schemeserve.com/index.php?title=More_advanced_documents
-
Thanks for that John. Good page to have for info but alas the same rules do not seem to apply to a table.
I thought I would need something along the lines of:
style="display:##IF([TableName_ColumnID]= 'NULL','none','')##"
I have no idea if the use of Null is correct, or if I am doing something else that is wrong. Any help gratefully received !!!
-
It's also possible to hide empty cells using the very latest browsers, so it is likely to work with the new renderer in SchemeServe BETA...
Please see:
- http://www.w3schools.com/cssref/pr_tab_empty-cells.asp
- http://stackoverflow.com/questions/12731789/hide-table-rows-if-empty/12731909#12731909 (I think this only works with cells).
I've produce a code snippet of both syntaxes:
Please sign in to leave a comment.
Comments
5 comments