I actually tried using jsreport.render and couldn't get it to work. but this code works great thanks!
It is likely though that I will have requirements for larger data so I might need the async option but I'll check first how it works with render.
Thanks!