Results 1 to 4 of 4

Thread: display report to windows using vb

  1. #1

    Thread Starter
    New Member
    Join Date
    Jun 1999
    Location
    Johor Bahru, Johor, Malaysia
    Posts
    4

    Post

    to anybody...

    i would like to know... how can i display report form ms Access using vb?

  2. #2
    Lively Member
    Join Date
    Jun 1999
    Location
    Raleigh, NC
    Posts
    70

    Post

    To display an Access report from a VB executable, you will have to use automation and instantiate Access. Then you would use the DoCmd.OpenReport "report name" method call. There was an article about doing this in VB Programmers Journal a while back. If you go to their site you can search for it.

    bash

  3. #3
    New Member
    Join Date
    Jun 1999
    Posts
    3

    Post

    I had a pretty good experience with VS Reports. The idea was pretty simple. Create your report in Access. After that you run the VSReports migration utility on it and it creates a seperate file for that report with the SQL Statement and other needed info. Included with the package was a control that helped you create your own viewing form...

    BD

  4. #4
    Lively Member
    Join Date
    Jun 1999
    Location
    Brisbane, Qld, Australia
    Posts
    78

    Post

    Well you could use Crystal reports in vb5. You create the report how you would like to see it protrayed on the screen first then you would save it. Then in Vb you would goto the components in projects menu and click on 'Crystal Report Control 4.6' and apply that. Then you just add the crystal report property (here i have called it RptReport)anywhere on your form and under where ever you want it to pop up you put code to this effect in:

    RptReport.WindowState = crptMaximized
    RptReport.ReportFileName = App.Path & "\NameofReport.rpt"
    RptReport.DataFiles(0) = pDatabase.Name
    RptReport.Destination = crptToWindow
    RptReport.Action = 1

    I hope this has helped you


    [This message has been edited by Spawny (edited 06-26-1999).]

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