Query results is empty does not display the contents of the report
description:
Some statements made in time, in order beautiful, clean, usually the result of the query is empty rows are not displayed in the report, which also recently developed a demand encountered in the process, then how to achieve this effect it?
Roadmap:
Reports display area is, in fact, the easiest way is to set the row height, the row height to 0 when the time, naturally achieve a hidden effect.
specific method:
Method 1: condition attribute
row height non-empty field is empty, then the line is 0 and
addition condition properties:
len(A1)=0
Method 2: JS achieve
Templates> Templates Web Properties - Page Break Preview settings (you can also preview other), individual settings for the template, and add load end event
if($("[id^=A2]").text().length==0){ $(".x-table").css("display","none"); }
to sum up:
Although both methods can be achieved, but have advantages and disadvantages, conditions of use property more complicated, if the area is much, too much trouble, but accurate. Use words js implemented quickly, but when some of the inexplicable problems, bad investigation. So daily development, we choose according to the actual situation!