How To Programmatically Convert Crystal Report to PDF Format


  • Hi
         How To Programmatically Convert Crystal Report to PDF Format. I am using Visaul basic 6.0 and Crystal report 8.5. Any one Know the answer,Pls reply soon.Following code is used my crystal report.Using this how to convert PDF Format.

    crptPur.ReportFileName = App.Path & "\report\rptStatus.rpt"
    crptPur.Connect = "DNS =xx; UID = xx; PWD = xx"
    crptPur.Action = 1


    Monday, October 17, 2005 6:34 AM


All replies

  • Moved this thread to a more appropriate forum (VS IDE is for questions about the development environment or "shell"), hopefully someone here can help.
    Wednesday, October 19, 2005 8:29 PM
  • sorry i only have .NET c#
    anyway the style of code should be similar, 

    public static void Assign_ExportOptions(ReportDocument rptDocument,
                string Destination_Filename)

                DiskFileDestinationOptions DiskOpts = new DiskFileDestinationOptions();
                DiskOpts.DiskFileName = Destination_Filename;
                rptDocument.ExportOptions.ExportDestinationType = ExportDestinationType.DiskFile;
                rptDocument.ExportOptions.ExportFormatType = ExportFormatType.PortableDocFormat;   
                rptDocument.ExportOptions.DestinationOptions = DiskOpts;

            public static void ExportReportToDisk(ReportDocument rptDocument,
                string DiskFilename)
                Assign_ExportOptions(rptDocument, DiskFilename);

    use should apply try-exception either.
    Thursday, October 20, 2005 5:37 AM
  • Hello Sumathra,

    There is a sample for this available from our web site at:


    The one that should interest you is:

    RDC Sample Application in VB - Exporting


    Keith - Business Objects
    Thursday, October 20, 2005 8:13 PM
  • But, currently one can export one report to one Disk File only. Exporting of multiple reports to a single disk file is not supported.

    I wanted to export multiple reposrts to a single PDF.

    Can anybody help?


    Thursday, November 29, 2007 10:31 AM

  • Maybe put them out to multiple files, then use itextsharp.dll to combine them...

    Friday, December 14, 2007 8:00 PM