dcsimg


DevX Home    Today's Headlines   Articles Archive   Tip Bank   Forums   

Results 1 to 4 of 4

Thread: reports in VB 6.0

  1. #1
    Join Date
    Nov 2006
    Posts
    13

    reports in VB 6.0

    hi,

    i have got an Access database named 'db1' and the table is named 'table1'. It contains the fields ''staff, project and hoursworked''. I'm using VB 6.0. How can i generate reports so that i know which staff has worked on which projects for how many hours? what are the code or what are the steps to follow? Should i create an interface to enter the name of the staff? Where should i put the code?Where should i enter the name of the staff so that, the system i'm developing generate the report for that particular staff? How do i generate the reports?

    Need your help urgently.

    thanks.

  2. #2
    Join Date
    Aug 2004
    Location
    Orange, California
    Posts
    1,263
    There is a sample project that comes with VB6 as part of the MSDN Help system. This project uses the Northwind sample database and creates a datareport in VB. The sample project on my system ended up in this location:

    C:\Program Files\Microsoft Visual Studio\MSDN\2001OCT\1033\SAMPLES\VB98\DataRept

    Yours may vary depending on your install of VB6 but basically find the MSDN folder and the folder for the MSDN version on your system will have the samples. My version as per the location above, was the Oct 2001 release of the MSDN help files. If the Samples are not there you may need to go back to your VB6 install disks and make sure to add the samples.

  3. #3
    Join Date
    Aug 2004
    Location
    Orange, California
    Posts
    1,263
    FYI: To create a Data report in VB6 requires using A DataEnviornment to base the report on and then adding a data report where you design the layout. It is very similar; but no way near as powerful as Access's own Report Designer. Another way to build a report is to use a third party product like Crystal Reports. Other wise you would have to use the Printer Object, which works like a PictureBox control where you would have to calculate the locations of each piece of text that you want to print, including figureing out when to page break, drawing the next page etc.
    If you know HTML you could write a routine that dumps the records in HTML format and create a nice report that way.
    Also check here for code samples: http://www.freevbcode.com/

  4. #4
    Join Date
    Oct 2005
    Location
    Maady
    Posts
    1,819

    Arrow

    Quote Originally Posted by deena2209
    hi,

    i have got an Access database named 'db1' and the table is named 'table1'. It contains the fields ''staff, project and hoursworked''. I'm using VB 6.0. How can i generate reports so that i know which staff has worked on which projects for how many hours?
    You may pass to the database a SQL command to do that like :
    db.open "SELECT * FROM tabel1 WHERE project=your_specified_project"
    and then customize your output for report .

    Quote Originally Posted by deena2209
    what are the code or what are the steps to follow?
    my previous method is by adding reference to such a version of ado for example and connect to it .

    Quote Originally Posted by deena2209
    Should i create an interface to enter the name of the staff?
    You need only to get from the user the project name [or the inverse you get the stuff to display projects]

    Quote Originally Posted by deena2209
    Where should i put the code?Where should i enter the name of the staff so that, the system i'm developing generate the report for that particular staff? How do i generate the reports?

    Need your help urgently.

    thanks.
    Put this code in such a command button which get the variable staff from a textbox for example , regarding to look in the samples in Access itself to know more about reports and how to creat marcos to execute them from your project and get those reports [all time your report formula must be created in access] .
    Programmer&Cracker CS
    MyBlog:Blog.Amahdy.com
    MyWebsite:www.Amahdy.com

Similar Threads

  1. MMFAN Retires
    By MMFAN in forum .NET
    Replies: 20
    Last Post: 09-22-2002, 11:54 PM
  2. VB and Crystal Reports
    By Jasvinder in forum VB Classic
    Replies: 0
    Last Post: 01-10-2002, 11:32 PM
  3. They created J#, why couldn't they do VB#?
    By Thomas Eyde in forum .NET
    Replies: 290
    Last Post: 12-22-2001, 03:13 PM
  4. How to link (.DBF) in 6.0 version into VB 6.0?
    By Emilia in forum VB Classic
    Replies: 0
    Last Post: 09-10-2000, 11:12 PM
  5. Replies: 0
    Last Post: 03-15-2000, 04:18 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
HTML5 Development Center
 
 
FAQ
Latest Articles
Java
.NET
XML
Database
Enterprise
Questions? Contact us.
C++
Web Development
Wireless
Latest Tips
Open Source


   Development Centers

   -- Android Development Center
   -- Cloud Development Project Center
   -- HTML5 Development Center
   -- Windows Mobile Development Center