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)
Birt iHub Javascript Report download without loading viewer
Nikhil Mahajan
<p>Hi,</p>
<p> </p>
<p>We have an iHub set up which is integrated to our application via Actuate Javascript API and successfully working.</p>
<p> </p>
<p>Now I want to generate an <strong>xlsx </strong>report but I don't want to load the viewer first and then use Export Option.</p>
<p>Instead what I want is to have an HTML button on my application on click of which the xlsx report is directly downloaded(or download box appeears) to client side instead of loading the viewer first to export the report.</p>
<p> </p>
<p>There is <strong>downloadReport </strong>option in viewer but it requires viewer to be loaded first. </p>
<p>Is there any other way to download report without loading viewer from iHub</p>
<p> </p>
<p>Thanks</p>
Find more posts tagged with
Comments
JFreeman
<p>I do not believe you are going to be able to generate a report through JSAPI directly without loading the viewer. However, there are a few options for what you are wanting to accomplish.</p>
<p> </p>
<ul><li>You can call a URL to execute the report and download it directly:
<ul><li><a data-ipb='nomediaparse' href='
http://hostname:8700/iportal/executereport.do?userid=Administrator&password=&invokeSumit=true&__executableName=/path/to/report.rptdesign&__format=XLSX'>http://hostname:8700/iportal/executereport.do?userid=Administrator&password=&invokeSumit=true&__executableName=/path/to/report.rptdesign&__format=XLSX</a></li>
;
</ul></li>
<li>If you are using iHub 3.1, you can use the REST API to generate a report and then download the output from the iHub.</li>
<li>You can use the Information Delivery API (IDAPI) to execute and download a report.</li>
</ul>
Nikhil Mahajan
<p>Hi,</p>
<p> </p>
<ul><li>The url method did worked but it seems insecure as we are passing username and password directly in get request. Is there any other way of doing it.</li>
<li>We have been using iHub 3.0 s I don't think web serices would work.</li>
<li>Don't know what actually idapi is. Did some googling and found out that we can write some java clients but our is an GroovyGrails application then how java clients would work with our application.</li>
</ul><p>Thanks</p>
JFreeman
<ul><li>In order to not authenticate by passing the username/password in the URL there are a couple of options.
<ul><li>You can not supply the username/password in the URL. Then when the URL opens, the user will be automatically redirected to the login.do page to authenticate and then redirected back to the download URL.</li>
<li>You can use make an initialize call with JSAPI and in the call back function open the URL without the username/password to download the report. The catch here is that a module must be loaded for initialize to work properly. However, you do not have to load the viewer. You can instead load a different module such as reportexplorer.</li>
</ul></li>
<li>You will need to upgrade from 3.0 to 3.1 in order to utilize the REST API.</li>
<li>IDAPI sends SOAP requests to the iHub. As it is SOAP, you do not have to use Java. However, the examples and majority of the implementations are done in Java. I am not very familiar with a Grails environment but it looks to integrate with a JVM which means it should be possible to have it load a java class that utilizes IDAPI.</li>
</ul>
Nikhil Mahajan
<p>Ok I am going with 1 st option of using urls direclty but does loading one among <strong>viewer </strong>or <strong>reportexplorer </strong>will make any difference as there will be performance impact in both the cases.</p>
<p> </p>
<p>Thanks</p>