C# Crystal Reports Export to Pdf
In certain circumstances, it becomes necessary to programmatically export Crystal Reports to the widely used .pdf format. During such instances, we can employ the ExportOptions feature to facilitate the seamless conversion of Crystal Reports into the desired .pdf format. Additionally, it is imperative to configure and utilize the PdfRtfWordFormatOptions, in conjunction with the ExportFormatType.PortableDocFormat, to ensure accurate and efficient exportation of the reports. In the following example you can see how to export a Crystal Reports as a PDF format file in C#.
All C# Crystal Reports Tutorial in this website is based on the following database - crystaldb. So before you begin this section , please take a look at the database structure of crystaldb - Click Here C# crystaldb
If you are new to Crystal Reports and do not know how to create Crystal Reports from C# , please take a look at the section step by step tutorial for creating a Crystal Reports from C#.
In this section we are using our earlier program step by step tutorial for creating a Crystal Reports from C# for pull data from database to Crystal Reports . Before we start this section take a look at the step by step tutorial for creating a Crystal Reports from C# .
Here we are making a Crystal Report from Product table and export the report content to a PDF format file.
Select the default form (Form1.cs) you created in C# and drag two buttons (Button1, Button2 ) and a CrystalReportViewer control to your form.
You have to include CrystalDecisions.CrystalReports.Engine in your C# Source Code.
Copy and paste the following source code and run your C# project.
Full Source C#cryRpt.Load(PUT CRYSTAL REPORT PATH HERE\\CrystalReport1.rpt");
The Crystal Reports file path in your C# project files location, there you can see CrystalReport1.rpt . So give the full path name of Crystal Reports file like c:\projects\crystalreports\CrystalReport1.rpt
When you run this program you will get the PDF file (csharp.net-informations.pdf) in your computer's C:
- C# Crystal Reports sample databse
- C# Crystal Reports step by step
- C# Crystal Reports from multiple tables
- C# Crystal Reports String parameter
- C# Crystal Reports Integer parameter
- C# Crystal Reports Date parameter
- C# Crystal Reports Dynamic Logon parameters
- C# Crystal Reports Formula Field
- C# Crystal Reports Summary Field
- C# Crystal Reports Export to Excel
- Email Crystal Reports from C# Application
- C# Crystal Reports without database
- C# Crystal Reports from SQL Query
- Dynamic Crystal Reports from C# Application
- C# Crystal Reports from XML
- C# Crystal Reports - sub reports
- C# Crystal Reports - on demand sub reports
- C# Crystal Reports - Date to Date
- How to print Crystal Reports in C#
- How to deploy Crystal Report
- How to Crystal Report Merge Module