Yes, there are options for 'Exporting' the report to many formats and PDF is one of them. There is a 'Crystal for Eclipse' SDK that is available. In this video will discuss how we can import Crystal Report into Excel and Pdf files in C#. Click subscribe for more videos. Skip navigation. How To Convert pdf to word without software. There are times when you would like to Export Crystal reports to various formats like PDF, Excel, etc. We have a tutorial which explains the Various Report formats support by Crystal Reports. We have also explained how to Export Crystal Report Using Crystal Report Viewer Control and also explained. Convert Word (doc,docx,docm),rtf, txt to PDF office Convert Text Rtf to Pdf is the best solution to convert dozens of printable documents as Word (doc,docx,docm),rtf, txt to pdf (as default format, as image format, as text format) It can batch convert high good quality for business and individual to improve the work efficiency.
22 Jun 2006
Currently I have an old developed system which use CR 9 with VB.Net 6. System deployed in Windows 2003 server. How can I use this method to convert to PDF with our old code? (Currently windows 10 not support crystal reports viewer.) We use report.asp file which gets data by session. This article discusses how to export Crystal Report on button click into PDF, Excel, Word, HTML, RTF in ASP.NET C#.
Introduction
Imports CrystalDecisions.CrystalReports.Engine
Imports CrystalDecisions.Shared
PublicClass clsCrystalToPDFConverter
Dim ConInfo AsNew CrystalDecisions.Shared.TableLogOnInfo
Dim oRDoc AsNew ReportDocument
Dim expo AsNew ExportOptions
Dim sRecSelFormula AsString
Dim oDfDopt AsNew DiskFileDestinationOptions
Dim strCrystalReportFilePath AsString
Dim strPdfFileDestinationPath AsString
PublicFunction SetCrystalReportFilePath(ByVal CrystalReportFileNameFullPath AsString)
strCrystalReportFilePath = CrystalReportFileNameFullPath
EndFunction
PublicFunction SetPdfDestinationFilePath(ByVal pdfFileNameFullPath AsString)
strPdfFileDestinationPath = pdfFileNameFullPath
EndFunction
PublicFunction SetRecordSelectionFormula(ByVal recSelFormula AsString)
sRecSelFormula = recSelFormula
EndFunction
PublicFunction Transfer()
oRDoc.Load(strCrystalReportFilePath) 'loads the crystalreports in to the memory
oRDoc.RecordSelectionFormula = sRecSelFormula 'used if u want pass the query to u r crystal form
oDfDopt.DiskFileName = strPdfFileDestinationPath 'path of file where u want to locate ur PDF
expo = oRDoc.ExportOptions
expo.ExportDestinationType = ExportDestinationType.DiskFile
expo.ExportFormatType = ExportFormatType.PortableDocFormat
expo.DestinationOptions = oDfDopt
oRDoc.SetDatabaseLogon('PaySquare', 'paysquare') 'login for your DataBase
oRDoc.Export()
EndFunction
EndClass
Crystal Report supports export of Reports in many formats. In these tutorials let us explore how to export Crystal report using the various options available in Crystal Reports.
You can look at the various export formats that are supported by the Crystal Report from the tutorials Crystal Report Export formats
How To Convert Crystal Report To Pdf In Asp.net
If you are new to Crystal Report you can look at our following tutorials to get started
Table of Content
- How to Export Crystal Report
- Crystal Report Viewer Control
- Export Crystal Report Using Report Document (SDK)
How to Export Crystal Report
Crystal Report can be exported in two ways
- Using Crystal Viewer Control.
- Using the method provided in Report Document Object (SDK).
Crystal Report Viewer Control
Crystal Report Viewer control is a .NET control. You can add it to your windows form or to web form so that you can display the report to the user. You can add this control to the form by dragging it from the toolbox.
Crystal Report viewer control displays the report to the user at runtime. It has the option to print, search, browse through the pages of the report. It has also had the option to export the report. This Option found at the top left corner of the Report
To Export to The Report do the following
Export Crystal Report Using Web Application
- Run your Crystal Report Project.
- Select the Export Report button at the top Left Corner.
- From the File Format Drop drown select appropriate format.
- From Page Range Option Select All Pages
If you want print selected pages choose Select Pages and enter the from and to page No. Note that some of the file formats has this feature disabled - Click on Export.
- File is downloaded.
Export Crystal Report Using Windows Application
Export Crystal Report in Windows Application
- Run your Crystal Report Project
- Select the Export Report button at the top Left Corner
- From the Save as Drop drown select appropriate format
- Note that Page Range option is not provided in the windows version of Crystal Report Viewer Control
- In File Name Option enter the name of the file
- Click on Save
Export Crystal Report Using Report Document (SDK)
Another way to Export crystal report is using the Methods provided in Report Document object. This option gives us the most flexibility when comes to exporting the report.
All the methods are available in the Namespace CrystalDecisions.CrystalReports.Enginewhich is contained in the assembly (dll) CrystalDecisions.CrystalReports.Engine.dll
Here is the list of Methods available in the SDK.
ExportToDisk
Use this option to export the report to disk. Method has following Option
Read our post Crystal Report Export formats for more information on each of these export formats
Options:
This export options found in the namespace CrystalDecisions.Shared.ExportOptions class. This class Has following members
ExportDestinationType
Gets or sets the options for the destination Type of the export for the report. The following Destinations are available to the report.
Gets or sets the options for the destination Type of the export for the report. The following Destinations are available to the report.
- ExportDestinationType.DiskFile
- ExportDestinationType.ExchangeFolder
- ExportDestinationType.MicrosoftMail
ExportDestinationOptions
Gets or sets the options for the destination of the export for the report. The following Destination are available to the report.
Gets or sets the options for the destination of the export for the report. The following Destination are available to the report.
- ExchangeFolderDestinationOptions
- MicrosoftMailDestinationOptions
- DiskFileDestinationOptions
ExportFormatType
Gets or sets the options for the format type of the export for the report. Available format types are listed in the previous section.
Gets or sets the options for the format type of the export for the report. Available format types are listed in the previous section.
ExportFormatOptions
Gets or sets the options for the format options of the export for the report. Each of the format Types have their own format options like
Gets or sets the options for the format options of the export for the report. Each of the format Types have their own format options like
- CharacterSeparatedValuesFormatOptions
- EditableRTFExportFormatOptions
- ExcelDataOnlyFormatOptions
- ExcelFormatOptions
- PdfFormatOptions
etc.
Each of these have various properties like page Range etc. which you can set programmatically
Using the SDK
Exporting the Crystal Report using the SDK is very simple and straight forward. We have created an tutorial on How to Export Crystal Report to PDF to use these SDK.