Click to See Complete Forum and Search --> : Attachment is not opening in new window


girish_patkar
10-25-2006, 01:17 AM
Hi Friends,

I am creating a jasper Report and exporting it to the ByteArrayStream using JRHtmlExporter. I am setting this ByteArrayStream to the response object and setting the header by using the following line
response.setHeader("Content-Disposition", "attachment;filename=\"Report.html\"");

I want this attachment to open in the new window in the client browser.
But the issue is, it is opening in the new window in some machines(Windows 2000 /IE 6.0 ) and it is opening in the same window in some other machines(Windows XP/IE 6.0 ) .

Please help me in fixing this issue.

Khalid Ali
10-27-2006, 08:21 PM
could you not make the link that causes this report to be shown to the user, open up in the new window, that way it will always open up in new window as long as JavaScript is enabled