Export Adhoc reports as PDF in a workflow
Hi all,
I am trying to export adhoc reports as pdfin a workflow but i am unable to find a correct solution. This solution works for other reports but adhoc.
var reportName = "RPT10";
var path = "export/report.pdf";
var exportFormat = "PDF";
isAdHoc = true;
//originUrl = "http://XXXX.XXXXX.com/view/adHocReport";
originUrl = "http://XXXX.XXXXX.com/xtk/adHocReport.jssp";
//originUrl = "http://XXXX.XXXXX.com/xtk/jsp/exportReport.jsp";
if( document.__securitytoken ){
originUrl += "&__securitytoken=" + document.__securitytoken;
}
var reportLabel = "Tracking Logs by Category-Test";
var _ctx = <ctx _context="global" _reportContext={reportName} __universe="reports" reportId="339421" _reportLabel ={reportLabel} _originUrl = {originUrl} />;
xtk.report.export(reportName,_ctx,exportFormat,path,isAdHoc);
I tried passing all possible originUrl(required for adhoc type) but it's not working. Anyone here who have exported adhoc reports?
Regards,
Amit