Howdy all!

I have to use .Net Framework 1.1 on this so bare with me ...

I have a web page that the user clicks a print button.
The print button redirects to another page.
In the page load event, I get my data, process it through Crystal
Reports objects and send it back out. Code listed below.

My objective is to pop the pdf out in a new window and return the
application back to another menu.

Thoughts?

Thanks,

Craig



' execute it in memory
PDFInMemory = crReport.ExportToStream
(ExportFormatType.PortableDocFormat)

' read it back to pass to the browser
aWork = PDFInMemory.ToArray

' house cleaning
PDFInMemory.Close()
crReport.Close()

With HttpContext.Current.Response
            .ClearContent()
            .ClearHeaders()
            .ContentType = "application/pdf"
            .AddHeader("Content-Disposition", "inline: filename =
ReportGeneric.pdf")
            .BinaryWrite(aWork)
            .End()
End With

Reply via email to