Note that there are some explanatory texts on larger screens.

plurals
  1. POHow to download xls file generated by the Jasper Report in extj 4.0.2a
    primarykey
    data
    text
    <p>Hello stackoverflow forum member. I need some support from you to generate the excel report and then download it with one click.</p> <p>I am working on extjs 4.0.2a along with Java. In java framework such as Hibernate/JPA and Spring. I am using Jasper Report to generate the report in excel and pdf. I am able to generate the report using it. But the problem is that I am not able to download it in my browser. Also my browser didn't prompt me to save or cancel the report generated.</p> <p>I am making request to server to generate the excel report using:</p> <pre><code>Ext.Ajax.request({url:'task/GetTaskReportXLS.action', success:function(response,option){console.log("success");}, failure:function(response,option){console.log("failure");}, scope:this}); </code></pre> <p>On my server side I am generating the excel report with response parameter as</p> <pre><code>response.setContentType("application/vnd.ms-excel"); response.setHeader("Content-Disposition","inline;filename=\"gantt.xls\""); response.addHeader("Content-Disposition", "attachment"); </code></pre> <p>When I click the export button the process executes and as the response on my firebug console I am getting headers as:</p> <pre><code>Response Headers Content-Disposition attachment Content-Length 0 Content-Type application/vnd.ms-excel Date Fri, 20 Jan 2012 10:00:49 GMT Server Apache-Coyote/1.1 </code></pre> <p>But still my download prompt not appear to save my excel report. Help me to point out what things I am doing wrong here.</p> <p>I am using extjs 4.0.2a mvc architecture with Java.</p>
    singulars
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload