Check for asset existence using jsRender
-
If the asset (image file) does not exist and <img src="foobar.jpg" is used then the report throws an error, is there an easy way to check for its existence to prevent this. Note I have 100s of images so manually checking is a pain.
-
Yes, use custom script to find out if the asset exists
https://jsreport.net/learn/scripts#query-an-entity-from-scriptI prepared demo for you
https://playground.jsreport.net/w/jan_blaha/8yHFbQNR
-
Gold! Thanks for providing an example.