I need to display jasperreport in my webApp, I'm using rest api to get report result (v2_rest) as HTML. I'm able to do this via IFRAME just pointing iframe src to rest URL.
I want to find a solution without iframe. I tried to get report result as dojo GET query:
dojo.xhrGet({
url: ...reportURL...,
handleAs:"text",
load: function(data) {},
error: function(error,params) {}
});
save it to javascript variable and use as <div>
innerHTML. But I'm always getting
RequestError: Unable to load ...reportURL... status: 0
as a GET response (error function is calling). THe URL is correct because the same works for iframe.
Also I tried to use the same URL as dojo ContentPane href. But I'm getting the same result as in case of GET query.
Can someone help me with this? Maybe I need to use some other solution.