Results 1 to 6 of 6

Thread: Open file in VB from database?!

  1. #1

    Thread Starter
    New Member
    Join Date
    May 2007
    Posts
    9

    Open file in VB from database?!

    I'm fairly new to access, VB, and Crystal reports. I have a button that i click in access that generates a table that is read in crystal. I want the .rpt file to lauch automatically after a build button is clicked that exists. I simply dont know what the code is to open a file rather than an application.

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

    Re: Open file in VB from database?!

    Welcome to the forums.

    I'm bit confused over the question. Do you want Crystal Reports to open the .rpt file or VB?

  3. #3

    Thread Starter
    New Member
    Join Date
    May 2007
    Posts
    9

    Re: Open file in VB from database?!

    sorry i was unclear,

    when a button is clicked in access i want it to launch a crystal reports file (.rpt)

    So the VB in Access needs to accomodate the opening of the file

  4. #4
    Fanatic Member amrita's Avatar
    Join Date
    Jan 2007
    Location
    Orissa,India
    Posts
    888

    Smile Re: Open file in VB from database?!

    Place The crystal report control on the form,(Common\Tools\VB\Crystl32.exe)
    connect it to the report file name.Place these code on button click.

    Code:
    CrystalReports1.ReportFilename="C:\Folder\Report1.rpt"
    CrystalReports1.Action=1
    (CrystalReports1 is the control name)

  5. #5

    Thread Starter
    New Member
    Join Date
    May 2007
    Posts
    9

    Re: Open file in VB from database?!

    I dont know what you mean or where to find "The crystal report control" and how to put it on a form? Also, I have no Common option from the menu bar nor a VB selection inside tools

  6. #6
    Fanatic Member amrita's Avatar
    Join Date
    Jan 2007
    Location
    Orissa,India
    Posts
    888

    Re: Open file in VB from database?!

    Check this site
    http://www.vbexplorer.com/VBExplorer...al_reports.asp

    Go to project components and browse for Common\Tools\VB\Crystl32.exe to add CR control to your project

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