Discussions
Categories
Groups
Community Home
Categories
INTERNAL ENABLEMENT
POPULAR
PUBLIC CLOUD
PRIVATE CLOUD
Quick Links
MY LINKS
HELPFUL TIPS
Back to website
Home
Intelligence (Analytics)
download pdf/excel from ihub using jsapi?
bcmp
<p>Is there a way to download a PDF/excel generated/uploaded in iportal using JSPAI. Only able to find out <b>downloadReport</b><span style="color:rgb(0,46,190);font-family:'Courier New', Courier, monospace;font-size:13px;">(format, pages, renderoption)</span>method to download from a report design in PDF/excel format.</p>
<p> </p>
<p>Thanks in advance</p>
<div> </div>
<p> </p>
Find more posts tagged with
Comments
Clement Wong
<p>What is your use case?</p>
<p> </p>
<p>Yes, <strong>downloadReport </strong>of the Viewer is available.</p>
<p><a data-ipb='nomediaparse' href='
http://developer.actuate.com/be/documentation/JAVADOCS/JSAPI-iHub3/symbols/actuate.Viewer$0.html#downloadReport'>http://developer.actuate.com/be/documentation/JAVADOCS/JSAPI-iHub3/symbols/actuate.Viewer$0.html#downloadReport</a></p>
;
<p> </p>
<p>The report must be first run/rendered and then you can get the report in PDF/Excel.</p>
<p> </p>
<p>JSAPI is mainly for embedding. If you want the report in PDF/Excel without running and rendering in the browser, then you should use the excutereport.do servlet (reference @ <a data-ipb='nomediaparse' href='
http://developer.actuate.com/be/documentation/ihub3-dev/AIG-main/index.html#page/aig/URIsApplication.34.8.html#ww145922).'>http://developer.actuate.com/be/documentation/ihub3-dev/AIG-main/index.html#page/aig/URIsApplication.34.8.html#ww145922).</a></p>
;
<p> </p>
<p>You can use JSAPI to do an actuate.authenticate instead of actuate.initialize. Example:</p>
<p> </p>
<p> actuate.authenticate(url, reqOps, form.input_username.value, form.input_password.value, null, JSAPI_Loaded, JSAPI_NotLoaded);</p>
<p> </p>
<p>Examples of executereport.do:</p>
<pre class="_prettyXprint">
http://myserver:8700/iportal/executereport.do?__requesttype=immediate&invokeSubmit=true&__executableName=/folder/reportname.rptdesign
http://myserver:8700/iportal/executereport.do?__requesttype=immediate&invokeSubmit=true&__executableName=/folder/reportname.rptdesign¶meter1=value1
http://myserver:8700/iportal/executereport.do?__requesttype=immediate&invokeSubmit=true&__executableName=/folder/reportname.rptdesign&__format=pdf</pre>
<p><em>Note (not documented yet in executereport.do manual): You can use __newWindow=true and the PDF will be downloaded as an attachment. If you use __newWindow=false, the PDF will be inline and be displayed in the browser.</em></p>
bcmp
<p>Use case is something like, the reports are scheduled for some time interval in the output format pdf/excel.</p>
<p> </p>
<p>But, from app UI a link will be provided to download from iportal the scheduled pdf/excel. So looking for jsapi to handle the download part without executing the report, since it is already scheduled and executed.</p>
Clement Wong
<p>If you don't need to display the report first, you don't need JSAPI. You can use JSAPI for authentication though.</p>
<p> </p>
<p>All you will need is the Information Console<strong> /iv </strong>directive to download the report (reference @ <a data-ipb='nomediaparse' href='
http://developer.actuate.com/be/documentation/ihub3-dev/AIG-main/index.html#page/aig/URIsBIRTViewer.36.4.html).'>http://developer.actuate.com/be/documentation/ihub3-dev/AIG-main/index.html#page/aig/URIsBIRTViewer.36.4.html).</a></p>
;
<p> </p>
<p>Examples:</p>
<pre class="_prettyXprint">
http://myserver:8700/iportal/iv?__report=/folder/report.rptdocument
http://myserver:8700/iportal/iv?__report=/folder/report.rptdocument&__format=pdf
http://myserver:8700/iportal/iv?__report=/folder/report.rptdocument&__format=pdf&__asattachment=false
http://myserver:8700/iportal/iv?__report=/folder/report.rptdocument&__format=xlsx
</pre>
bcmp
It looks like the call is made to report and then it generates/downloads in PDF/excel format.<br><br>
But ideally, would like to download PDF/excel already generated in the iportal.
Clement Wong
<p>/iv does not run/generate a report. It views/downloads an existing report operation.</p>
<p> </p>
<p>/executereport.do does run/generate and then views a report.</p>