Results 1 to 4 of 4

Thread: Export Crystal Reports to PDF

  1. #1

    Thread Starter
    New Member
    Join Date
    Apr 2007
    Location
    Alenquer, Lisboa, Portugal
    Posts
    3

    Export Crystal Reports to PDF

    I need to export a "rpt file" to PDF.

    In my code the report is "created" and then i whant export to pdf whitouth prompt user's. How can i do this??

    there is the ExportOptions components with export functionality, how it works?

    code pls...

    Best Regard's

  2. #2
    PowerPoster
    Join Date
    Oct 2002
    Location
    British Columbia
    Posts
    9,758

    Re: Export Crystal Reports to PDF

    Set the ExportOptions and then call the Export method...

    Code:
                With Report.ExportOptions
                    .DestinationType = crEDTDiskFile
                    .DiskFileName = strFileName
                    .FormatType = crEFTPortableDocFormat
                    .PDFExportAllPages = True
                End With
    
                Report.Export False 'false = dont prompt user

  3. #3

    Thread Starter
    New Member
    Join Date
    Apr 2007
    Location
    Alenquer, Lisboa, Portugal
    Posts
    3

    Re: Export Crystal Reports to PDF

    tks...

    it work's.

  4. #4
    Addicted Member
    Join Date
    Mar 2002
    Posts
    135

    Re: Export Crystal Reports to PDF

    If am trying to use tha sane code but it is giving me an error as "Server Not Open".

    Code:
    Dim appl As New CRAXDDRT.Application
    Dim rep As CRAXDDRT.Report
    
    Set rep = appl.OpenReport(App.Path & "\Reports\pro_8_Eng.rpt", 1)
    rep.RecordSelectionFormula = "{Pro8.VillageNo} = " & cmbVillage.ItemData(cmbVillage.ListIndex)
    rep.ExportOptions.DiskFileName = App.Path & "\Reports\pdf_report.pdf"
    rep.ExportOptions.DestinationType = crEDTDiskFile
    rep.ExportOptions.FormatType = crEFTPortableDocFormat
    rep.Export False
    The only thing is that I am using RecordSelectionFormula.
    If I try to run the above code without RecordSelectionFormula then it work fine...

    Any suggestion...

    Regards.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width