Is there any way to access a standard HTML report using some type of cross origin handler?
Accessing a report over API (e.g. …api/reports/AbCdEfGH123/data.html) only presents the custom code which is obviously handled better by generateHtmlReport.action. Is there perhaps an alternative report handler or should we look at developing one to meet our needs?
So you want to get the html, then rendering it in a external app? the problem I see with that, is that the queries inside that HTML report will not have CORS enabled, will they? if it was just html, there should be no problems… but I assume you are using some kind of XHR to fetch the data, not sure how well that would work.
Is there any way to access a standard HTML report using some type of cross origin handler?
Accessing a report over API (e.g. …api/reports/AbCdEfGH123/data.html) only presents the custom code which is obviously handled better by generateHtmlReport.action. Is there perhaps an alternative report handler or should we look at developing one to meet our needs?
I would recommend handling this on your side (styling, formatting, etc). The “generateHtmlReport.action” part comes from struts and is internal to DHIS 2 and is not documented or guaranteed to remain stable.
regards,
Lars
···
On Wed, Jun 10, 2015 at 10:37 AM, Morten Olav Hansen mortenoh@gmail.com wrote:
Hi Greg
So you want to get the html, then rendering it in a external app? the problem I see with that, is that the queries inside that HTML report will not have CORS enabled, will they? if it was just html, there should be no problems… but I assume you are using some kind of XHR to fetch the data, not sure how well that would work.
Is there any way to access a standard HTML report using some type of cross origin handler?
Accessing a report over API (e.g. …api/reports/AbCdEfGH123/data.html) only presents the custom code which is obviously handled better by generateHtmlReport.action. Is there perhaps an alternative report handler or should we look at developing one to meet our needs?