Step 1: Creating Data Environment Designer

Perform steps 1, 4, 5, and 12-14 from pages VB 6.66 - VB 6.67 of your book, substitute the steps listed below for the other steps listed on those pages. In Place of the Crystal Report Control discussed in Chapter 6 of your book , Microsoft has developed its own Report module discussed below. This topic creates the customer data report using a Data Environment designer as a data source. The Data Environment designer uses the Sound Advice database developed in the lab steps 1 and 2 to create a simple report. The three reports require the use of three tables, Customers, Employees, and Compact Discs. Only the exact steps are specified for the Customer Report. Follow the same procedure to create the Employee and Compact Disc reports. The finished reports resemble the figures on page VB 6.67 of your book.

Customer Report containing the following fields: Customer ID, Name, Address, City, State, Zip Code, Balance and Employee ID.

Before you begin the step-by-step process, ensure that the Sound Advice database (Sound Advice.mdb) is present on your floppy. If it is not present, complete the in the labs 1 and 2 from chapter 6 first.

To create a simple hierarchical cursor in the Data Environment designer

  1. Retrieve the Sound Advice.vbp project from your floppy disk.
  2. On the Project menu, click Add Data Environment to add a designer to your project. If the designer is not listed on the Project menu, click Components. Click the Designers tab, and click Data Environment to add the designer to the menu.
  3. Note The first four kinds of ActiveX designers loaded for a project are listed on the Project menu. If more than four designers are loaded, the later ones will be available from the More ActiveX Designers submenu on the Project menu.

  4. Right-click on Connection1 to display the short-cut menu, click on Properties. On the Data Link Properties dialog box, click Microsoft Jet 3.51 OLE DB Provider. This selects the correct OLE DB provider for accessing a Jet database.
  5. Click the Next button to get to the Connection tab.
  6. Click the ellipsis button (...) next to the first text box.
  7. Use the Select Access Database dialog box to navigate to the Sound Advice.mdb file, which should be located on your floppy disk as a result of completing in the labs 1 and 2 at the end of chapter 6.
  8. Click OK to close the dialog box.
  9. Right-click the Connection1 icon, and click Rename. Change the name of the icon to SoundAdvice.
  10. Right-click the SoundAdvice icon, and then click Add Command to display the Command1 dialog box. In the dialog box, set the properties as shown below:
  11. Property

    Setting

    Command Name

    Customers

    Connection

    Sound Advice

    DataBase Object

    Table

    Object Name

    Customers

  12. Click OK to close the dialog box.
  13. Right-click the SoundAdvice icon, and then click Add Command to display the Command1 dialog box. In the dialog box, set the properties as shown below:
  14. Property

    Setting

    Command Name

    Employees

    Connection

    Sound Advice

    DataBase Object

    Table

    Object Name

    Employees

  15. Click OK to close the dialog box.
  16. Right-click the SoundAdvice icon, and then click Add Command to display the Command1 dialog box. In the dialog box, set the properties as shown below:
  17. Property

    Setting

    Command Name

    CompactDiscs

    Connection

    Sound Advice

    DataBase Object

    Table

    Object Name

    CompactDiscs

  18. Click to see Report EnviromnentClick OK to close the dialog box.
  19. Set the properties of the project and designer according to the settings below, then save the project:

Object

Property

Setting

Project

Name

Sound Advice3

DataEnvironment

Name

deSoundAdvice

Go to Step 2: