Click here to Skip to main content
11,705,453 members (31,947 online)
Click here to Skip to main content

Crystal Reports To PDF converter Without Crystal Report Viewer

, 22 Jun 2006 85.9K 2.2K 35
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

You may also be interested in...

Comments and Discussions

 
GeneralMy vote of 1 Pin
alex.barylski31-Jul-13 8:28
memberalex.barylski31-Jul-13 8:28 
QuestionVB6 - convert crystal report to PDF - facing error Pin
SumithaNair27-Sep-11 20:34
memberSumithaNair27-Sep-11 20:34 
GeneralMy vote of 5 Pin
Member 308949229-Jun-10 22:00
memberMember 308949229-Jun-10 22:00 
Generalplease help Pin
ayunie28-Feb-07 20:44
memberayunie28-Feb-07 20:44 
GeneralAdditional information: Missing parameter values. Pin
imtiyaz momin17-Jan-07 17:08
memberimtiyaz momin17-Jan-07 17:08 
GeneralChanging database type at run time Pin
AlexEvans28-Nov-06 16:09
memberAlexEvans28-Nov-06 16:09 
Generalok.. I am new to this... Pin
vertigo196621-Sep-06 12:50
membervertigo196621-Sep-06 12:50 
GeneralRe: ok.. I am new to this... Pin
satalaj26-Sep-06 2:25
membersatalaj26-Sep-06 2:25 
QuestionAre you serious? Pin
super4-Aug-06 11:33
membersuper4-Aug-06 11:33 
AnswerRe: Are you serious? Pin
satalaj26-Sep-06 2:24
membersatalaj26-Sep-06 2:24 
GeneralGood sample, slow output Pin
REBratton29-Jun-06 10:06
memberREBratton29-Jun-06 10:06 
GeneralRe: Good sample, slow output Pin
LiYunLong19-Sep-06 17:15
memberLiYunLong19-Sep-06 17:15 
GeneralRe: Good sample, slow output Pin
satalaj26-Sep-06 2:23
membersatalaj26-Sep-06 2:23 
GeneralRe: Good sample, slow output Pin
bamafanforlife30-Jan-07 4:51
memberbamafanforlife30-Jan-07 4:51 
GeneralRe: Good sample, slow output Pin
hannous5-Jun-07 2:30
memberhannous5-Jun-07 2: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
Web01 | 2.8.150819.1 | Last Updated 23 Jun 2006
Article Copyright 2006 by satalaj
Everything else Copyright © CodeProject, 1999-2015
Layout: fixed | fluid