Click here to Skip to main content
Click here to Skip to main content

Crystal Reports To PDF converter Without Crystal Report Viewer

, 22 Jun 2006
Rate this:
Please Sign up or sign in to vote.
Here You Can Convert Crystal Report To PDF
<!-- Article Starts - DO NOT ADD HTML/BODY START TAGS-->

Introduction

Imports CrystalDecisions.CrystalReports.Engine

Imports CrystalDecisions.Shared

Public Class clsCrystalToPDFConverter

Dim ConInfo As New CrystalDecisions.Shared.TableLogOnInfo

Dim oRDoc As New ReportDocument

Dim expo As New ExportOptions

Dim sRecSelFormula As String

Dim oDfDopt As New DiskFileDestinationOptions

Dim strCrystalReportFilePath As String

Dim strPdfFileDestinationPath As String

Public Function SetCrystalReportFilePath(ByVal CrystalReportFileNameFullPath As String)

strCrystalReportFilePath = CrystalReportFileNameFullPath

End Function

Public Function SetPdfDestinationFilePath(ByVal pdfFileNameFullPath As String)

strPdfFileDestinationPath = pdfFileNameFullPath

End Function

Public Function SetRecordSelectionFormula(ByVal recSelFormula As String)

sRecSelFormula = recSelFormula

End Function

Public Function 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()

End Function

End Class

License

This article has no explicit license attached to it but may contain usage terms in the article text or the download files themselves. If in doubt please contact the author via the discussion board below.

A list of licenses authors might use can be found here

Share

About the Author

satalaj
Architect Smart wireless pvt ltd. Pune
India India
No Biography provided

Comments and Discussions

 
GeneralMy vote of 1 Pinmemberalex.barylski31-Jul-13 9:28 
QuestionVB6 - convert crystal report to PDF - facing error PinmemberSumithaNair27-Sep-11 21:34 
GeneralMy vote of 5 PinmemberMember 308949229-Jun-10 23:00 
Generalplease help Pinmemberayunie28-Feb-07 21:44 
GeneralAdditional information: Missing parameter values. Pinmemberimtiyaz momin17-Jan-07 18:08 
GeneralChanging database type at run time PinmemberAlexEvans28-Nov-06 17:09 
Generalok.. I am new to this... Pinmembervertigo196621-Sep-06 13:50 
GeneralRe: ok.. I am new to this... Pinmembersatalaj26-Sep-06 3:25 
QuestionAre you serious? Pinmembersuper4-Aug-06 12:33 
AnswerRe: Are you serious? Pinmembersatalaj26-Sep-06 3:24 
GeneralGood sample, slow output PinmemberREBratton29-Jun-06 11:06 
GeneralRe: Good sample, slow output PinmemberLiYunLong19-Sep-06 18:15 
GeneralRe: Good sample, slow output Pinmembersatalaj26-Sep-06 3:23 
GeneralRe: Good sample, slow output Pinmemberbamafanforlife30-Jan-07 5:51 
GeneralRe: Good sample, slow output Pinmemberhannous5-Jun-07 3:30 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.

| Advertise | Privacy | Terms of Use | Mobile
Web02 | 2.8.141220.1 | Last Updated 23 Jun 2006
Article Copyright 2006 by satalaj
Everything else Copyright © CodeProject, 1999-2014
Layout: fixed | fluid