Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Convert Crystal report to PDF file
Message
From
19/09/2003 06:53:36
 
 
To
All
General information
Forum:
ASP.NET
Category:
Other
Title:
Convert Crystal report to PDF file
Miscellaneous
Thread ID:
00830601
Message ID:
00830601
Views:
53
Hi All,
I have written the code for converting crystal report into PDF file. But I am getting the error saying,
[ An unhandled exception of type 'System.Reflection.TargetInvocationException' occurred in ABC.exe

Additional information: Exception has been thrown by the target of an invocation.]

Could anyone please let me know, what's wrong in this code?
-----------------------------------------------------------------
Try
' Declare variables and get the export options.
_reportObject = New rptCompanyListing()
Dim exportOpts As New ExportOptions()
Dim diskOpts As New DiskFileDestinationOptions()
exportOpts = _reportObject.ExportOptions

SetParameterValue(0, _company)
SetParameterValue(1, _phone)
SetParameterValue(2, _fax)

' Set the export format.
exportOpts.ExportFormatType = _
ExportFormatType.RichText
exportOpts.ExportDestinationType = _
ExportDestinationType.DiskFile

' Set the disk file options.
diskOpts.DiskFileName = "C:\xxx.Pdf"
exportOpts.DestinationOptions = diskOpts

' Export the report.
_reportObject.Export()

Catch eException As Exception
Throw eException

End Try
------------------------------------------------------------------------

Thanks in Advance,

Ravi
Reply
Map
View

Click here to load this message in the networking platform