I'm using Crystal reports to display a page in PDF format now this works but
can take some time. I found a good example of how to dislpay a dynamic
"loading....." whilst the page loads. Unfortunately the two do not seem to
be compatible as it says
Server cannot clear headers after HTTP headers have been sent.
This is really down to my lack of understanding how web pages are processed,
if the answer is simple can you please let me know as it is quite a useful
script. Many Thanks
Now the example code of the "loading...." can be found here
http://www.kbalerts.com/feedback_837375.aspx
My source contains the following which is a procedure fired of in a "not is
postback" event.
Fname = Page.MapPath("rptTemp") & "\" & Session.SessionID.ToString & ".pdf"
crDiskFileDestinationOptions = New DiskFileDestinationOptions()
crDiskFileDestinationOptions.DiskFileName = Fname
crExportOptions = crReportDocument.ExportOptions
With crExportOptions
..DestinationOptions = crDiskFileDestinationOptions
..ExportDestinationType = ExportDestinationType.DiskFile
..ExportFormatType = ExportFormatType.PortableDocFormat
End With
crReportDocument.Export()
' The following code writes the pdf file
' to the Clients browser.
Response.ClearContent()
Response.ClearHeaders() <------------------Error Occurs here
Response.ContentType = "application/pdf"
Response.WriteFile(Fname)
Response.Flush()
Response.Close()