Results 1 to 5 of 5

Thread: need help in crystal report

  1. #1

    Thread Starter
    Hyperactive Member binilmb's Avatar
    Join Date
    Nov 2005
    Location
    Kochi
    Posts
    472

    need help in crystal report

    hi
    im new to crystal report. how can i call it in vb and is there any way to save the report to .pdf file
    ßįňįl

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

    Re: need help in crystal report

    Moved to reporting section.

  3. #3

    Thread Starter
    Hyperactive Member binilmb's Avatar
    Join Date
    Nov 2005
    Location
    Kochi
    Posts
    472

    Re: need help in crystal report

    how can i call crystal report in vb
    ßįňįl

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

    Re: need help in crystal report

    This is a snippet from a VB.Net program I wrote, but you may be able to adapt it to VB:
    VB Code:
    1. Imports CrystalDecisions.CrystalReports.Engine
    2. Imports CrystalDecisions.Shared
    3.  
    4. Dim CrystalReportDocument As ReportDocument
    5.        Dim CrystalExportOptions As ExportOptions
    6.        Dim CrystalDiskFileDestinationOptions As DiskFileDestinationOptions
    7.  
    8.        Dim Filename As String
    9.        CrystalReportDocument = New ReportDocument()
    10.        CrystalReportDocument.Load("Path" & "CrystalReportTemplateName.rpt")
    11.  
    12.        Filename = "C:\FileName.pdf"
    13.  
    14.        CrystalDiskFileDestinationOptions = New DiskFileDestinationOptions()
    15.        CrystalDiskFileDestinationOptions.DiskFileName = Filename
    16.        CrystalExportOptions = CrystalReportDocument.ExportOptions
    17.        With CrystalExportOptions
    18.            .DestinationOptions = CrystalDiskFileDestinationOptions '<- This is what makes it save the report on disk
    19.            .ExportDestinationType = ExportDestinationType.DiskFile
    20.            .ExportFormatType = ExportFormatType.PortableDocFormat '<- This is what makes it save it as a pdf document
    21.        End With
    22.       CrystalReportDocument.Export()

  5. #5
    Member
    Join Date
    Aug 2004
    Location
    Northern Territory, Australia
    Posts
    61

    Re: need help in crystal report

    what version crystal reports and vb?

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