Results 1 to 8 of 8

Thread: Report ..

  1. #1

    Thread Starter
    Fanatic Member
    Join Date
    Dec 2005
    Posts
    570

    Report ..

    How can I make a Report like in acces? Is it easy to make a Report and take print as easy in Access. Please help.

    Seema_s

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

    Re: Report ..

    Make your report in Access and just call it from VB.

    Other than the printer object, VB has not built in reporting features.

  3. #3

    Thread Starter
    Fanatic Member
    Join Date
    Dec 2005
    Posts
    570

    Re: Report ..

    Quote Originally Posted by Hack
    Make your report in Access and just call it from VB.

    Other than the printer object, VB has not built in reporting features.

    What is the code to call a report from VB? I need help plz.

  4. #4
    Frenzied Member litlewiki's Avatar
    Join Date
    Dec 2005
    Location
    Zeta Reticuli Distro:Ubuntu Fiesty
    Posts
    1,162

    Re: Report ..

    select data report in vb ide from project>add data report and then change the data source and record source properties .create text boxes and labels in that report and also link them.Then just call your report from vb code .

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

    Re: Report ..

    Quote Originally Posted by seema_s
    What is the code to call a report from VB? I need help plz.
    First, go into Access and create the report.

    Then, from your VB program, set a reference to the MS Access Object Library, then run something like this
    VB Code:
    1. Private Sub cmdPrintReport_Click()
    2.            Dim Axs As Access.Application
    3.            Set Axs = CreateObject("Access.Application")
    4.            Axs.OpenCurrentDatabase (DBPath)
    5.            Axs.DoCmd.OpenReport "MyReport"
    6.            Set Axs = Nothing
    7.            Axs.Quit
    8. End Sub
    Where MyReport is the name of your Access report and DBPath is the full path and db name of your database.

  6. #6

    Thread Starter
    Fanatic Member
    Join Date
    Dec 2005
    Posts
    570

    Re: Report ..

    Quote Originally Posted by Hack
    First, go into Access and create the report.
    Hi, Friends. Thanks for the help. Let me know is it hard to create a report in VB?

    Regards,

    Seema_S

  7. #7

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

    Re: Report ..

    Quote Originally Posted by seema_s
    Hi, Friends. Thanks for the help. Let me know is it hard to create a report in VB?

    Regards,

    Seema_S
    I already explained that you don't create a report in VB. You create a report in Access, or Crystal Reports or some other type of report generator, and call the report from 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