Exclude Empty Binary Image (Blob) From Being Render - RenderIf

This entry guides you through the steps on how to exclude empty binary image from being rendered by using RenderIf scripting

  1. RML template design as per below

  1. 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

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

  1. Output Result

If the image is empty, in this case RAW_tab2.ds - the output render will show below

image

if the RAW_tab2.ds contain binary image the ouput render will show as below

image