473,407 Members | 2,598 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,407 software developers and data experts.

Help With the Response Command.

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()
Nov 18 '05 #1
0 974

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

2
by: Irvin | last post by:
I new to ASP.net and am using the following code to attempt to update an Access 2000 mdb. The code does make it through the code following "try". NO rows are updated. There is a row with the...
3
by: Dave | last post by:
I have a piece of hardware connected via serial port. I need to send a variety of commands to the box and route the responses back from the receive thread to the correct method call. So e.g. I...
2
by: Irvin | last post by:
I new to ASP.net and am using the following code to attempt to update an Access 2000 mdb. The code does make it through the code following "try". NO rows are updated. There is a row with the...
0
by: richard | last post by:
OK, Im finished pulling my hair out and now I need help. I have created a VB class file for my custom paging, in it I create a table with 2 rows, in the rows I have linkbuttons for first page,...
2
by: registry | last post by:
<%@Language="VBSCRIPT" CODEPAGE="1252"%> <html> <head> <title>Registry Network Hospital Detail</title> <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1"> <script...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.