Results 1 to 7 of 7

Thread: convert crystal report to pdf format?

  1. #1

    Thread Starter
    Lively Member
    Join Date
    May 2004
    Location
    malaysia
    Posts
    89

    Resolved convert crystal report to pdf format?

    Hi all,

    how to convert a crystal report into pdf format during run time.

    please feel free to give advice.
    thankx
    Last edited by kkc; Jul 7th, 2005 at 08:41 AM. Reason: resolve

  2. #2
    Hyperactive Member
    Join Date
    Mar 2005
    Location
    Manila, Philippines
    Posts
    486

    Re: convert crystal report to pdf format?

    cr actually has a capability of writing in pdf format

  3. #3
    Ex-Super Mod RobDog888's Avatar
    Join Date
    Apr 2001
    Location
    LA, Calif. Raiders #1 AKA:Gangsta Yoda™
    Posts
    60,709

    Re: convert crystal report to pdf format?

    If you use the CR Viewer in your project, then you can use the Export button and add the appropriate dlls (from CR) to allow the
    user to export to pdf file.
    VB/Office Guru™ (AKA: Gangsta Yoda®)
    I dont answer coding questions via PM. Please post a thread in the appropriate forum.

    Microsoft MVP 2006-2011
    Office Development FAQ (C#, VB.NET, VB 6, VBA)
    Senior Jedi Software Engineer MCP (VB 6 & .NET), BSEE, CET
    If a post has helped you then Please Rate it!
    Reps & Rating PostsVS.NET on Vista Multiple .NET Framework Versions Office Primary Interop AssembliesVB/Office Guru™ Word SpellChecker™.NETVB/Office Guru™ Word SpellChecker™ VB6VB.NET Attributes Ex.Outlook Global Address ListAPI Viewer utility.NET API Viewer Utility
    System: Intel i7 6850K, Geforce GTX1060, Samsung M.2 1 TB & SATA 500 GB, 32 GBs DDR4 3300 Quad Channel RAM, 2 Viewsonic 24" LCDs, Windows 10, Office 2016, VS 2019, VB6 SP6

  4. #4

    Thread Starter
    Lively Member
    Join Date
    May 2004
    Location
    malaysia
    Posts
    89

    Re: convert crystal report to pdf format?

    i would appreciate if some one can post a sample or a link.
    thankx.

  5. #5
    Addicted Member
    Join Date
    Jun 2005
    Posts
    139

    Re: convert crystal report to pdf format?

    Try this

    VB Code:
    1. Dim ReportApp As New CRAXDRT.Application
    2.    Dim ReportObject As CRAXDRT.Report
    3.    Set ReportObject = ReportApp.OpenReport(myReport, 1)
    4.    ReportObject.Database.LogOnServer "PDSODBC.DLL", myServer, myDatabase, myDbUserId, myDbPassword
    5.    
    6.    With ReportObject
    7.       With .ExportOptions
    8.          .DestinationType = crEDTDiskFile
    9.          .FormatType = crEFTPortableDocFormat
    10.          .DiskFileName = myOutputName
    11.       End With
    12.       .PaperSize = myPaperSize
    13.       .PaperOrientation = myPaperOrientation
    14.       .Export False
    15.    End With

  6. #6
    Ex-Super Mod RobDog888's Avatar
    Join Date
    Apr 2001
    Location
    LA, Calif. Raiders #1 AKA:Gangsta Yoda™
    Posts
    60,709

    Re: convert crystal report to pdf format?

    If you want the CR Viewer then an example is in my signature. "VB6/Crystal Report Ex"
    The export is part of the viewers "Export" button. No code needed to export.
    VB/Office Guru™ (AKA: Gangsta Yoda®)
    I dont answer coding questions via PM. Please post a thread in the appropriate forum.

    Microsoft MVP 2006-2011
    Office Development FAQ (C#, VB.NET, VB 6, VBA)
    Senior Jedi Software Engineer MCP (VB 6 & .NET), BSEE, CET
    If a post has helped you then Please Rate it!
    Reps & Rating PostsVS.NET on Vista Multiple .NET Framework Versions Office Primary Interop AssembliesVB/Office Guru™ Word SpellChecker™.NETVB/Office Guru™ Word SpellChecker™ VB6VB.NET Attributes Ex.Outlook Global Address ListAPI Viewer utility.NET API Viewer Utility
    System: Intel i7 6850K, Geforce GTX1060, Samsung M.2 1 TB & SATA 500 GB, 32 GBs DDR4 3300 Quad Channel RAM, 2 Viewsonic 24" LCDs, Windows 10, Office 2016, VS 2019, VB6 SP6

  7. #7

    Thread Starter
    Lively Member
    Join Date
    May 2004
    Location
    malaysia
    Posts
    89

    Re: convert crystal report to pdf format?

    thanx all

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