Results 1 to 5 of 5

Thread: [RESOLVED] Is datareport what I need?

  1. #1

    Thread Starter
    Hyperactive Member
    Join Date
    Apr 2007
    Location
    cobwebbed to PC
    Posts
    311

    Resolved [RESOLVED] Is datareport what I need?

    Hi im using DAO and access with vb6 [no ado or sql]

    I have a database that is used to aorse data collected from a user in recursive cycles by a vb6 app.

    I need the app to be able to print a report at the end that doe not just give me a list of records but instead will take have the date and title in the head
    and display the number of types of parts used/scraped

    IE an eg of my db record:

    Date; time; opID; p1serial; part type; part num; fault; location; rep serial; board count;

    I need the report to say a total of x boards processed (total in db) on date xx/xx/xxxx

    then; so parts with number xxxxxxx had fault xxxx from location xxxxxx
    etc

    I can easily writ functions inside my app to get the neccessary numbers etc but I havnt a clue where to start wit code for the report.
    was lookin around online and it doesnt seem that reports a really used in this kind of way, am I wrong? anyone feel like helpin a dunce out? ;}

    I cannot use much outside of vb6 and access though.

    thanks very much in advance

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

    Re: Is datareport what I need?

    If you are familiar with Access, then I'd suggest you write the report using that and just call it from your Vb app.

  3. #3

    Thread Starter
    Hyperactive Member
    Join Date
    Apr 2007
    Location
    cobwebbed to PC
    Posts
    311

    Re: Is datareport what I need?

    Ok I just reread my complete idiots guide to access and made up a quik rport in access.

    how do I call this in vb? (to preview and then print)

    should prob be more detailed. I need to print it without leaving the application and without access opening in the background as access i A)not installed on the machines this runs on (just the vb runtime files) and B) for report data security.

    I just came across some code on the internet that I thought would do the job, and seems to be the way this is done, but it does open access. It used the docmd object etc.
    Last edited by wolf99; May 21st, 2007 at 11:47 AM. Reason: more spec:

  4. #4
    Frenzied Member KGComputers's Avatar
    Join Date
    Dec 2005
    Location
    Cebu, PH
    Posts
    2,024

    Re: Is datareport what I need?

    Hi,

    In your vb 6.0 application, Add a reference to Microsoft Access Object Library, then add a code using

    Code:
    DoCmd.OpenReport "report name", view type
    There was also a post I started regarding this topic...Do a search on this forum...


    Greg
    CodeBank: VB.NET & C#.NET | ASP.NET
    Programming: C# | VB.NET
    Blogs: Personal | Programming
    Projects: GitHub | jsFiddle
    ___________________________________________________________________________________

    Rating someone's post is a way of saying Thanks...

  5. #5

    Thread Starter
    Hyperactive Member
    Join Date
    Apr 2007
    Location
    cobwebbed to PC
    Posts
    311

    Re: Is datareport what I need?

    Quote Originally Posted by KGComputers
    Your going to create queries in your database then set the record source property of the data report...
    Whew If i knew that at the start I prob wouldnt have needed post at all!

    *now goes in search of notes on query building......*

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