Results 1 to 4 of 4

Thread: Use Export feature of Crystal Report

  1. #1

    Thread Starter
    New Member
    Join Date
    Sep 2007
    Posts
    2

    Use Export feature of Crystal Report

    I want to export a Crystal Report to PDF file, but without opening Crystal Report form in Visual Basic.

  2. #2
    I'm about to be a PowerPoster! Hack's Avatar
    Join Date
    Aug 2001
    Location
    Searching for mendhak
    Posts
    58,333

    Re: Use Export feature of Crystal Report

    Moved to Reporting

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

    Re: Use Export feature of Crystal Report

    Which version of Crystal? Check the following thread

    http://www.vbforums.com/showthread.php?t=357094

  4. #4
    PowerPoster Pasvorto's Avatar
    Join Date
    Oct 2002
    Location
    Minnesota, USA
    Posts
    2,951

    Re: Use Export feature of Crystal Report

    Here's an example:

    Set Report = crxApplication.OpenReport("Z:\DAD\CorrectiveAction.rpt", 1)
    For Each crxDatabaseTable In Report.Database.Tables
    crxDatabaseTable.ConnectionProperties("user id") = "sa"
    crxDatabaseTable.ConnectionProperties("Password") = myPasswordTechniSQL
    Next crxDatabaseTable
    Report.RecordSelectionFormula = "{CORRECTIVEACTION.MDR} = '" & txtMDR.Text & "'"
    Report.PaperOrientation = crDefaultPaperOrientation
    Report.ExportOptions.FormatType = crEFTPortableDocFormat
    Report.ExportOptions.DiskFileName = "C:\CorrectiveActionResponse-" & txtMDR.Text & ".pdf"
    Report.ExportOptions.DestinationType = crEDTDiskFile
    Report.Export False
    ===================================================
    If your question has been answered, mark the thread as [RESOLVED]

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