Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Convert Crystal report to PDF file
Message
De
19/09/2003 06:53:36
 
 
À
Tous
Information générale
Forum:
ASP.NET
Catégorie:
Autre
Titre:
Convert Crystal report to PDF file
Divers
Thread ID:
00830601
Message ID:
00830601
Vues:
54
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
Répondre
Fil
Voir

Click here to load this message in the networking platform