cancel
Showing results for 
Search instead for 
Did you mean: 

Exporting to PDF format

Former Member
0 Kudos

Hi all,

How do I get CR to print to a file as in a PDF file.

Now I am printing on to a pre printed form.

I want to save it to a file called X.pdf (where X (var) is the Bill No which is a numeric field as in 12345.pdf or 4567.pdf)

and the x.pdf is to be saved into a folder called LabBills. If the x.pdf exisists in the folder then overwrite without prompting.

my Code:

Dim crFormulas As FormulaFieldDefinitions

Dim MyReport As New CrystalDecisions.CrystalReports.Engine.ReportDocument

MyReport.Load("\Lab1.rpt")

Dim crFormulaTextField1 As FormulaFieldDefinition

Dim crFormulaTextField2 As FormulaFieldDefinition

crFormulas = MyReport.DataDefinition.FormulaFields

crFormulaTextField1 = crFormulas.Item("FrBlno")

crFormulaTextField2 = crFormulas.Item("FrDt")

crFormulaTextField1.Text = vBlno

crFormulaTextField2.Text = "'" & dtp1.Text & "'"

MyReport.PrintToPrinter(1, False, 0, 0)

Tnx

Paps

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

File \ Export \ select PDF

Former Member
0 Kudos

Oh no I need to do it via my vb program.

Former Member
0 Kudos

I need to do this thru my VB program.

I just dont know if the Export syntax to get VB to print

MyReport.ExportToDisk (To Pdf format)

MyReport.Export (To Pdf format)

Has anyone created and saved the report into PDF format without dispalying it on screen?

ido_millet
Active Contributor
0 Kudos

Wrong forum. Post to the legacy (RDC) or .Net forum.

Answers (1)

Answers (1)

Former Member
0 Kudos

Dear mpapali,

Did you succeed in finding a solution for the automatic export to PDF?

Kind Regards

Auke Quist