Click here to Skip to main content
Licence 
First Posted 22 Jun 2006
Views 65,919
Bookmarked 34 times

Crystal Reports To PDF converter Without Crystal Report Viewer

By | 22 Jun 2006 | Article
Here You Can Convert Crystal Report To PDF
 
Part of The SQL Zone sponsored by
See Also

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

About the Author

satalaj

Architect
Smart wireless pvt ltd. Pune
India India

Member



Sign Up to vote   Poor Excellent
Add a reason or comment to your vote: x
Votes of 3 or less require a comment

Comments and Discussions

 
You must Sign In to use this message board. (secure sign-in)
 
Search this forum  
 FAQ
    Noise  Layout  Per page   
  Refresh
QuestionVB6 - convert crystal report to PDF - facing error PinmemberSumithaNair20:34 27 Sep '11  
GeneralMy vote of 5 PinmemberMember 308949222:00 29 Jun '10  
Generalplease help Pinmemberayunie20:44 28 Feb '07  
GeneralAdditional information: Missing parameter values. Pinmemberimtiyaz momin17:08 17 Jan '07  
GeneralChanging database type at run time PinmemberAlexEvans16:09 28 Nov '06  
Generalok.. I am new to this... Pinmembervertigo196612:50 21 Sep '06  
GeneralRe: ok.. I am new to this... Pinmembersatalaj2:25 26 Sep '06  
QuestionAre you serious? Pinmembersuper11:33 4 Aug '06  
AnswerRe: Are you serious? Pinmembersatalaj2:24 26 Sep '06  
GeneralGood sample, slow output PinmemberREBratton10:06 29 Jun '06  
GeneralRe: Good sample, slow output PinmemberLiYunLong17:15 19 Sep '06  
GeneralRe: Good sample, slow output Pinmembersatalaj2:23 26 Sep '06  
GeneralRe: Good sample, slow output Pinmemberbamafanforlife4:51 30 Jan '07  
GeneralRe: Good sample, slow output Pinmemberhannous2:30 5 Jun '07  

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.

Permalink | Advertise | Privacy | Mobile
Web01 | 2.5.120517.1 | Last Updated 23 Jun 2006
Article Copyright 2006 by satalaj
Everything else Copyright © CodeProject, 1999-2012
Terms of Use
Layout: fixed | fluid