Hi all,
How do I get CR to print to 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.
The following code will print to the printer, I need the syntax to Export directly to a PDF file.
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)
Thanks
Paps