| |
ActiveReports for .NET Support
Started by ffmike at 12-03-2003 7:31 PM. Topic has 2 replies.
 
 
 
|
|
Sort Posts:
|
|
|
|
12-03-2003, 7:31 PM
|
ffmike
Joined on 10-08-2003
Posts 5
|
PDF export from ASPX, e-mail file name problem
|
|
|
|
|
|
So, I've got an ASP.NET page, call it foo.aspx, that pumps out an ActiveReport named rptFoo like this:
Dim m_stream As New System.IO.MemoryStream Dim rpt As New rptFoo rpt.DataSource = dsReport rpt.DataMember = "Report" rpt.Run() Me.PdfExport1.Export(rpt.Document, m_stream) m_stream.Position = 0 Response.ContentType = "application/pdf" Response.AddHeader("Content-Length", m_stream.Length.ToString()) Response.AddHeader("Content-Disposition", "inline; filename=Foo.pdf") Response.BinaryWrite(m_stream.ToArray()) Response.End()
Now, this all works great, and pulls up the Acrobat document inside the browser. The problem comes when the user clicks on the Acrobat E-mail button, and sends the document. Instead of "Foo.pdf" the attachment (which is the valid PDF) comes across as "foo.aspx".
So, how do I fool Acrobat into thinking that the file it's dealing with is really foo.pdf when it comes time to send e-mail?
|
|
|
|
|
Report
|
|
|
|
12-04-2003, 3:31 AM
|
Sergey
Joined on 08-28-2004
Novosibirsk, Russia
Posts 3,015

|
Re: PDF export from ASPX, e-mail file name problem
|
|
|
|
|
|
Hello, Firstly, the filename that Acrobat uses as the email attachment is really outside the realm of ActiveReports and is up to the Acrobat application. Secondly, there is work-around, change line of code Response.AddHeader("Content-Disposition", "inline; filename=Foo.pdf") to Response.AddHeader("Content-Disposition", "attachment; filename=Foo.pdf")
Sergey Abakumoff GrapeCity
|
|
|
|
|
Report
|
|
|
|
|
GrapeCity » Product Support » ActiveReports f... » Re: PDF export from ASPX, e-mail file name problem
|
|
|
|
|