Results 1 to 6 of 6

Thread: How to Export a crystal report 8.5 file to msword or excel etc in vb6.0?

  1. #1

    Thread Starter
    Frenzied Member cssriraman's Avatar
    Join Date
    Jun 2005
    Posts
    1,465

    How to Export a crystal report 8.5 file to msword or excel etc in vb6.0?

    Hi all,

    I already designed reports which are working fine. I need to export it to word or excel or something else.

    Please help me. I am using Crystal reports 8.5 and VB 6

    Thanks in advance.
    CS

  2. #2
    PowerPoster
    Join Date
    Feb 2006
    Location
    East of NYC, USA
    Posts
    5,691

    Re: How to Export a crystal report 8.5 file to msword or excel etc in vb6.0?

    You want to export an existing report after it's created? Or you want to create a "report" as a Word document?

  3. #3

    Thread Starter
    Frenzied Member cssriraman's Avatar
    Join Date
    Jun 2005
    Posts
    1,465

    Re: How to Export a crystal report 8.5 file to msword or excel etc in vb6.0?

    I want to export an existing report after it's created.
    CS

  4. #4
    PowerPoster
    Join Date
    Feb 2006
    Location
    East of NYC, USA
    Posts
    5,691

    Re: How to Export a crystal report 8.5 file to msword or excel etc in vb6.0?

    Where is it being created? To a disk file? To the printer? To memory?

  5. #5

    Thread Starter
    Frenzied Member cssriraman's Avatar
    Join Date
    Jun 2005
    Posts
    1,465

    Re: How to Export a crystal report 8.5 file to msword or excel etc in vb6.0?

    To store it in Hard Disk
    CS

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

    Re: How to Export a crystal report 8.5 file to msword or excel etc in vb6.0?

    Should be something like this...
    VB Code:
    1. Option Explicit
    2. 'Add a reference to CR xx.x ActiveX Designer Runtim Library
    3. Private Sub Command1_Click()
    4.  
    5.     Dim crApp As CRAXDRT.Application
    6.     Dim oRpt As CRAXDRT.Report
    7.    
    8.     Set crApp = New CRAXDRT.Application
    9.     Set oRpt = crApp.OpenReport("D:\Report1.rpt", 1)
    10.     oRpt.ExportOptions.DestinationType = crEDTDiskFile
    11.     oRpt.ExportOptions.DiskFileName = "D:\Report1.xls"
    12.     oRpt.ExportOptions.FormatType = crEFTExcel80
    13.     oRpt.ExportOptions.ExcelUseConstantColumnWidth = True
    14.     oRpt.Export False
    15.    
    16. End Sub
    Last edited by RobDog888; Apr 6th, 2006 at 10:39 PM.
    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

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