Similar question was answered also here
http://stackoverflow.com/questions/42776892/jsreport-template-dynamic-generate-2d-barcode