Hi everybody,
I have an ASP.NET website where clients can view their monthly billings by selecting different options. One of the option is the way they want to see the report i.e. whether they want to see it in PDF or EXCEL etc etc..... What I am trying to acheive is depending on their choice of format, I want to send the stream of that particulae selected format to the browser. I have tried couple od solutions but I couldn't able to get them to work. Following is one of them.
Following should work but I m getting the following error: "Thread was being aborted."
-------------------------------------------------------------------------------------------------------------
Private Sub xlsExport()
Dim oStream As New System.IO.MemoryStream()
oStream = myReport.ExportToStream(ExportFormatType.PortableDocFormat)
Response.Clear()
Response.Buffer() = True
Response.ContentType = "application/pdf"
Try
Response.BinaryWrite(oStream.ToArray()) <--------------------- error occured after this
Response.End()
Catch err As Exception
Response.Write("< BR >")
Response.Write(err.Message.ToString)
End Try
End Sub
-------------------------------------------------------------------------
Any help or sugestion will be highly appreciated.
Thanks.
I have an ASP.NET website where clients can view their monthly billings by selecting different options. One of the option is the way they want to see the report i.e. whether they want to see it in PDF or EXCEL etc etc..... What I am trying to acheive is depending on their choice of format, I want to send the stream of that particulae selected format to the browser. I have tried couple od solutions but I couldn't able to get them to work. Following is one of them.
Following should work but I m getting the following error: "Thread was being aborted."
-------------------------------------------------------------------------------------------------------------
Private Sub xlsExport()
Dim oStream As New System.IO.MemoryStream()
oStream = myReport.ExportToStream(ExportFormatType.PortableDocFormat)
Response.Clear()
Response.Buffer() = True
Response.ContentType = "application/pdf"
Try
Response.BinaryWrite(oStream.ToArray()) <--------------------- error occured after this
Response.End()
Catch err As Exception
Response.Write("< BR >")
Response.Write(err.Message.ToString)
End Try
End Sub
-------------------------------------------------------------------------
Any help or sugestion will be highly appreciated.
Thanks.