Skip to Content
author's profile photo Former Member
Former Member

Exporting to PDF format

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

Add a comment
10|10000 characters needed characters exceeded

Assigned Tags

Related questions

2 Answers

  • Best Answer
    author's profile photo Former Member
    Former Member
    Posted on Feb 08, 2011 at 07:47 PM

    File \ Export \ select PDF

    Add a comment
    10|10000 characters needed characters exceeded

  • author's profile photo Former Member
    Former Member
    Posted on May 06, 2011 at 01:01 PM

    Dear mpapali,

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

    Kind Regards

    Auke Quist

    Add a comment
    10|10000 characters needed characters exceeded

Before answering

You should only submit an answer when you are proposing a solution to the poster's problem. If you want the poster to clarify the question or provide more information, please leave a comment instead, requesting additional details. When answering, please include specifics, such as step-by-step instructions, context for the solution, and links to useful resources. Also, please make sure that you answer complies with our Rules of Engagement.
You must be Logged in to submit an answer.

Up to 10 attachments (including images) can be used with a maximum of 1.0 MB each and 10.5 MB total.