CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com
Results 1 to 6 of 6
  1. #1
    Join Date
    Apr 2001
    Location
    Salt Lake City, UT
    Posts
    135

    Crystal Reports Automation

    How do i use the crystal reports add-ins for visual basic? i basically want a report to run from a vb app (not using the viewer) and export that report direclty to a file (adobe pdf). I've read thru some of the help files that come with crystal reports, but i'm still lost.
    Any advice?

    ~goddess
    [email protected]
    "There are no stupid questions, but there are a lot of inquisitive idiots."

  2. #2
    Join Date
    Aug 1999
    Location
    India, TamilNadu, Chennai.
    Posts
    269

    Re: Crystal Reports Automation

    hi

    you can select export formate form the available list of PrintFileType property,

    and assign PrintFileName property to export file name,

    then assign destination property to rptfile

    This will directly export to file without preview.

    Babu.

    MailID: [email protected]
    Please avoid sending emails to my personal mail:
    write your doubts as thread in Codeguru
    Crystal Reports Forum
    .

    This will help all people having similar matters, and will let people who know solutions on the specific topic
    share their knowledge.

    Visit my company web site (Qmax Test Equipments Private Limited)

    Yours friendly,
    K.Babu

  3. #3
    Join Date
    Apr 2001
    Location
    Salt Lake City, UT
    Posts
    135

    Re: Crystal Reports Automation

    Do you have a code sample of how to do this? I need to see how it is done from start to finish (like creating the cyrstal report object, etc.)

    Thanks!

    ~goddess
    [email protected]
    "There are no stupid questions, but there are a lot of inquisitive idiots."

  4. #4
    Join Date
    Sep 2000
    Posts
    77

    Re: Crystal Reports Automation

    Hi,

    I am also looking out for some sample program, incase you found some thing can u tell me about it.

    Regards,
    kiran.




  5. #5
    Join Date
    Aug 2001
    Location
    India
    Posts
    173

    Re: Crystal Reports Automation

    'Here you have to check out for the formattype, then set it to PDF file.
    Private Sub command1_Click()
    Dim Report as New CrystalREport1
    Report.ExportOptions.FormatType = crEFTText
    Report.ExportOptions.DestinationType=crEDTDiskFile
    Report.ExportOptions.DiskFileName = "FileName"
    Report.Export False
    End Sub


  6. #6
    Join Date
    Nov 2001
    Location
    Nederland
    Posts
    2

    Re: Crystal Reports Automation

    Here some additional stuff:

    ' Set the reportname
    CrystalReport1.ReportFileName = strReportname
    ' To send an (additional) selection
    CrystalReport1.ReplaceSelectionFormula (strSelect)
    ' To print the report
    ' First you have to define the way of printing
    ' (to a file, to screen or to the printer)
    CrystalReport1.PrintReport

    If you have the Crystal component you can use the object browser to view the properties and methods. Good luck.


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

Featured