hi
i want to export crystal report to html format i am using following code
Dim rpt As New test
Private Sub Page_Load(ByVal sender As System.Object, ByVal e As System.EventArg s) Handles MyBase.Load
'Put user code to initialize the page here
CrystalReportVi ewer1.ReportSou rce = rpt
End Sub
Private Sub btn_export_Clic k(ByVal sender As System.Object, ByVal e As System.EventArg s) Handles btn_export.Clic k
Dim oStream As New MemoryStream
---> oStream = rpt.ExportToStr eam(ExportForma tType.HTML40)
Response.Clear( )
Response.Buffer = True
Response.Conten tType = "applicatio n/vnd.html"
Response.AddHea der("content-disposition", "attachment ; filename=cool.h tml")
Response.Binary Write(oStream.T oArray)
Response.End()
End Sub
it throws following exception on the marked line (--->)
"Could not find file "C:\DOCUME~1\ER 040\ASPNET\LOCA LS~1\Temp\expor t_9c0db9c3-db72-4f5a-a011-f4620d04b5d0.tm p"."
I have exported crystal report to word and pdf format successfully using above method but it making problem in html format.
can any body help me
RAF....
i want to export crystal report to html format i am using following code
Dim rpt As New test
Private Sub Page_Load(ByVal sender As System.Object, ByVal e As System.EventArg s) Handles MyBase.Load
'Put user code to initialize the page here
CrystalReportVi ewer1.ReportSou rce = rpt
End Sub
Private Sub btn_export_Clic k(ByVal sender As System.Object, ByVal e As System.EventArg s) Handles btn_export.Clic k
Dim oStream As New MemoryStream
---> oStream = rpt.ExportToStr eam(ExportForma tType.HTML40)
Response.Clear( )
Response.Buffer = True
Response.Conten tType = "applicatio n/vnd.html"
Response.AddHea der("content-disposition", "attachment ; filename=cool.h tml")
Response.Binary Write(oStream.T oArray)
Response.End()
End Sub
it throws following exception on the marked line (--->)
"Could not find file "C:\DOCUME~1\ER 040\ASPNET\LOCA LS~1\Temp\expor t_9c0db9c3-db72-4f5a-a011-f4620d04b5d0.tm p"."
I have exported crystal report to word and pdf format successfully using above method but it making problem in html format.
can any body help me
RAF....