Return to IFS 110 class Notes Menu!

Project 6
Database Management
and
Reporting Applications

Introduction

Add-ins Professional Edition of VB6

Train Track Inventory System

Options Menu

Visual Data Manager

Databases Supported by VisData

Data Form Designer

Modifying Data Form Code

cmdAdd_Click Event

cmdUpdate_Click Event

Bookmarks

cmdDelete_Click Event

cmdClose_Click Event

Validate Event

Reposition Event

Error Event

Visual Basic Data Form Designer

Modifying Inventory Form
(three-step process)

  1. Modify control interface
  2. Modify properties
  3. Modify Code

Adding ActiveX Controls

Finished Inventory form contains two ActiveX controls to be added
  1. Data-bound ComboBox (DBCombo) control
  2. Crystal Reports Control

Modifying the Interface

Modifying Properties

SQL (Structured Query Language)

select * from [Inventory] Order by [StockNumber]

Setting Startup Form

Modifying Code

SelLength property

Refresh method

Refresh Method

Writing a Recordset Search Routine

stocknum = InputBox ("Enter Stock Number", "Find")

SearchString = "StockNumber = " & Val (stocknum)

Writing Recordset Search Routine

Data1.Recordset.FindFirst SearchString

If Data1.Recordset.NoMatch = True Then

Report Designer Add-In

Important Note Visual Basic 6 users:

Report Designer Add-In (2 elements)

  1. Crystal Reports - powerful Windows report writer used to design a nearly endless variety of custom reports
  2. Crystal Custom Control - is an ActiveX control that makes it easy to build the connection between VB application and the created reports

Using Crystal Custom Control

Crystal Custom Control Properties

Crystal Custom Control Code

CrystalReport1.WindowTitle = "TrainTrack Inventory by Railroad"

CrystalReport1.ReportFileName = "a:\Inventory.prt"

CrystalReport1.DiscardSavedData = True

 CrystalReport1.Action = 1 

Project 6
Database Management and
Reporting Applications

END

Visual Data Manager, Crystal Reports Requirements

Return to IFS 110 class Notes Menu!