This entry guides you through the steps on how to exclude empty binary image from being rendered by using RenderIf scripting
- RML template design as per below
- Below are the two datasources samples for the report template. RAW_tab.ds contain binary image while RAW_tab2.ds does not contain binary image
3/ RenderIf script configured at Horizontal box level under Functions tab → RenderIf tab
var ds = DataCacheManager.getCache(“RAW_tab”);
ds.getObject(“IBLOB”) != null
and
var ds = DataCacheManager.getCache(“RAW_tab2”);
ds.getObject(“IBLOB”) != null
- Output Result
If the image is empty, in this case RAW_tab2.ds - the output render will show below
if the RAW_tab2.ds contain binary image the ouput render will show as below