May 2021 3 42 Report
Rewrite Visual Basic code to C#?

Below is the code I need rewrote to C#. I'm writing a C# application in Visual Studio 2005. I need a code for a button where it exports a Crystal Report to PDF. I just can't find the code in C#, so I figured someone could help write this Visual Basic cod in C#. Any help would be greatly appreciated!!! Thanks

CrDiskFileDestinationOptions = New DiskFileDestinationOptions()

CrDiskFileDestinationOptions.DiskFileName = “C:\exported.pdf”

CrExportOptions = crReportDocument.ExportOptions

With crExportOptions

.DestinationOptions = crDiskFileDestinationOptions

.ExportDestinationType = ExportDestinationType.DiskFile

.ExportFormatType = ExportFormatType.PortableDocFormat

End With

CrReportDocument.Export()

MessageBox.Show (“Report Exported”)

Please enter comments
Please enter your name.
Please enter the correct email address.
You must agree before submitting.

Answers & Comments


Helpful Social

Copyright © 2024 QUIZLS.COM - All rights reserved.