Iron Speed Technical Forums
Register Latest Topics
 
 
 


Reply
  Author   Comment  
jgerber

Registered:
Posts: 9
Reply with quote  #1 
I'm getting a ThreadAbortException with the message "Thread was being aborted." in the function that is autogenerated for Crystal Reports print button.

In the DisplayReportAsPDF_CrystalReportButton function here is the code:

 

Code:

' Export as a stream

Dim stream As System.IO.Stream = reportObject.ExportToStream(CrystalDecisions.Shared.ExportFormatType.PortableDocFormat)

Dim content() AsByte = NewByte(Convert.ToInt32(stream.Length)) {}

stream.Read(content, 0, content.Length)

'output as an attachment

' BaseClasses.Utils.NetUtils.WriteResponseBinaryAttachment(Me.Page.Response, "ComplaintHistory.pdf", content, 0, True)

BaseClasses.Utils.NetUtils.WriteResponseBinaryAttachment(Me.Page.Response, "ConsumerComplaints.rpt", content, 0, True)



The last line that calls WriteResponseBinaryAttachment is returning the error.

 

The weird thing is that I use this function for other print buttons on other pages and it works fine. But on this one page, it is throwing this error.

Any ideas?

evanpan

Registered:
Posts: 5
Reply with quote  #2 
Hi,  jgerber.
Thanks for your nice sharing. But do you have any experience about pdf converting process? Any suggetsion will be appreciated. Thanks in advance.       



Best regards,
Pan
JimiJ

Avatar / Picture

MVP Developer
Registered:
Posts: 1,948
Reply with quote  #3 
Quote:
Originally Posted by evanpan

"... But do you have any experience about pdf converting process?"     


If you are using Telerik Reporting, it's fairly easy:
http://docs.telerik.com/reporting/faq-display-pdf-browser


Jimi J


__________________

  Jaime Jegonia
[jts_logo]

Iron Speed MVP Developer
 

". . . and whoever sows generously will also reap generously" 2 Cor 9:6

Previous Topic | Next Topic
Print
Reply

Quick Navigation:

Download Iron Speed Designer

Terms of Service Privacy Statement