You are on page 1of 100

Quick Start Guide and Modification 91

❒ Click the Form Wizard button in the New Form dialog box.
form), which opens in the project window when creating a new form.

❒ Click the Wizard button in the New dialog box, which will
It is closed when you click the New button on the standard toolbar or select the New command on the File menu.
Consider creating a form using the wizard from the project window:

1. Open the project database. To do this, on the Data tab of the project window, position the cursor on the name of the
database and click the Open button. In this case, on the standard toolbar in the Databases list, the name of the
open database will appear.

2. On the Documents tab of the project designer window, select the Forms group and click the New button. The New
Form dialog box opens (Fig. 5.2).

Ðèñ. 5.2. Long-distance window New form

3. Click the Form Wizard button.

4. After starting the form wizard, the Wizard Selection dialog box opens (Fig. 5.3). The value of the Form Wizard is
used to create a one-table form, and the One-to-Many Form Wizard is used for a multi-table form. By default, the
first value is set. Click OK to launch the Single Table Form Wizard.

3 NOTE
To create a form using the wizard, you must answer the asked questions in the dialog boxes that appear on the screen. To go to
the next step of the wizard, use the Next button. If you need to change the parameters set in the previous steps, you can go back
using the Back button. To refuse to continue creating the form, use the Cancel button.

5. The first wizard dialog box appears (Fig. 5.4), in which you must specify the table for which the form is created, and
select the fields of this table to be placed in the form. There are two lists in the Databases and tables area. The
top list contains a list of open databases, the bottom list of tables of the selected database. Select the required
database from the top list and the table for which you are creating a form from the bottom.
92 Chapter 5

Ðèñ. 5.3. Extended window for type construction:


Multi-purpose or multi-purpose

Ðèñ. 5.4. Building a site with support tools

3 NOTE
It may turn out that in the wizard's dialog box, the lists in the Databases and tables area are empty or do not contain the data
that is needed to build the form. This situation arises if the necessary database has not been previously opened. Nothing
wrong. To select a database and its tables, click the button next to the list of databases, and in the Open dialog box that
opens, find the table that will be used when creating the form.
Quick Start Guide and Modification 93

6. After selecting a table, the Available fields list will contain a list of all the fields in the table. It is necessary to transfer
from the list to the Selected fields list the fields that will be located in the created form. To transfer fields, use the
buttons located between the lists. After creating the list of fields displayed on the form, click Next to proceed to
the next step.

7. In the wizard dialog that appears, you should set the display style of the form objects and the types of control
buttons (Fig. 5.5).

Ðèñ. 5.5. Shortcut for playing back and forth buttons and additional buttons

For form objects, the wizard offers a choice of nine different design options from the Style list. When you select
each of the styles, you can see how the form objects will look like, using the viewing area in the upper left part of
the dialog box.

The Button type switch contains options that allow you to specify the type of display placed in the form of control
buttons (Table 5.1).

Section 5.1. Button Type Button type

Îïöèÿ Îèï ò î î î

Text buttons Hardware Tools Includes Online Security


(Direct buttons)

Picture buttons Tools for use in the production of products


(Press the buttons)
94 Chapter 5

Section 5.1 (General)

Îïöèÿ Îèï ò î î î

No buttons (No Tool buttons in the absence of tools


buttons)

Custom To change the size of the software button: Find (Print), Print (Add), Add (Delete), Export
(Next) () Assignment for Recordings Using Additional Instructions in the Field of
Instrumentation

Set the necessary options and click Next.

8. At the next (third) step, a criterion is specified for sorting the data displayed in the form (Fig. 5.6).

Ðèñ. 5.6. Installing the crate for the installation

Fields to be sorted must be placed in the Selected fields list. You can use the Add button or mouse to transfer fields
from the Available fields or index tag list to the Selected fields list. Position the cursor on the field by whose value
you want to organize the data, and double-click the mouse or click the Add button. The field will be moved to the
Selected fields list. To remove a field from the Selected fields list, position the cursor on it and double-click it or click
the Remove button. The field will be returned to the Available fields or index tag list.
Quick Start Guide and Modification 95

The Ascending (Descending) and Descending (Descending) options determine whether the data in the specified
field will be sorted in ascending or descending order. To proceed to the next step, click Next.

9. At the final step of creating the form using the wizard (Fig. 5.7), you can specify the title of the form in the Type a
title for your form field, as well as indicate the intended actions with the created form using the options described
in Table. 5.2.

Section 5.2. Form Wizard window - Step 4

Îïöèÿ Action

Save form for later use (Save The construction company is still on the ground
form)

Save and run form (Save and run the form on top) Build-up and keep up to date and complete

Save form and modify it in the Form Designer. Composite form and continuous design for quick change

In the last wizard dialog box, the following flags are located:

• Use field mappings - when this check box is selected, form objects corresponding to the table fields will be
created based on the parameters specified in the Field mapping tab of the Options dialog box that opens
when selecting the Options command from the Tools menu. Otherwise, objects in the form will be created
based on the information contained in the database;

• Override with DBC field display classes (Replace with classes of objects defined for table fields). When the
check box is selected, the wizard uses the correspondence of the types of objects created in the form when
placing table fields in it, specified in the table designer on the Fields tab using the Display class list of the
Map field type to classes area ) If these matches are not specified, the Use field mappings option is used;

• Add pages for fields that do not fit - when you check the box for objects that do not fit on the form, tabs will
be automatically created.

Using the Preview button, you can see how the created form will look, and if something is wrong, return to the
previous steps in the wizard and change the settings.

After all parameters are entered, click the Finish button. The Save As dialog box opens, in which you specify the
file name and folder in which the form should be placed.

In fig. 5.8 presents the form created using the wizard. If additional tools are required to manage the form, you can
change it in the form designer.
96 Chapter 5

Ðèñ. 5.7. Assortment of the terms and conditions and the optional modalization of the available options
Possibilities for a low price

Ðèñ. 5.8. Support, Building, and Supporting Services


Quick Start Guide and Modification 97

3 NOTE
Look at the form created by the wizard. When placing labels, the wizard used the names of the fields entered in the Caption
field of the Table Designer table designer. If the information in these fields is absent, then the inscriptions in the form will
coincide with the table field names.

Start up
There are many ways to run a form for execution in Visual FoxPro. In the form designer window, do one of the
following:

❒ select the Run Form command from the Form menu;

❒ run the Run Form command in the context menu;

❒ Click the Run button on the standard Visual FoxPro toolbar;

❒ press the key combination <Ctrl> + <E>.


To start a form from the project designer window, position the cursor on its name and click the Run button.

You can also run the form as a program. To do this, follow these steps:

1. From the Program menu, select the Do command.

2. In the Do dialog box that opens, set the type of executable file (in this case, Form) and select the required form
from the list of files.

3. Click the Do button.

Partnership
Open the form created using the wizard in the form designer (Fig. 5.9). To do this, select the form in the project
window and do one of the following:

❒ Click the Modify button on the project window.

❒ Double click on the name of the form.

❒ Select the Modify File command on the Project menu.

3 NOTE
In the last dialog box of the wizard, when you set the Save form and modify it in the Form Designer option, the form created
using the wizard opens immediately in the form designer.

All objects placed in the form (title, fields, labels, buttons, lines) are characterized by properties that can be configured in
accordance with certain requirements. In addition to properties for objects, there are built-in methods that are executed
when events associated with them occur. To view the properties and methods of an object placed on a form, select it,
and then do one of the following:

❒ right-click and select Properties from the context menu


(Properties);
98 Chapter 5

❒ click the Properties Window button on the toolbar


Form Designer.

Ðèñ. 5.9. Support, support and assistance in the construction industry

As a result, the Properties window opens with the properties and methods of the selected object (Fig. 5.10).

The drop-down list at the top of the Properties window contains a list of all form objects. It can be used to select an
object instead of highlighting the desired object in the form. The tabs below the list contain the names of the objects
of the form grouped by type of property and method (table. 5.3).

Section 5.3. Explanation of the Settings list of the Properties window

On Remarks

All (Âñå) Compiles a list of all the features and methods of the method in the manual

Data (Advanced) Combines the right of access to the original accessories.

Methods (Methods) Compiles a list of all the methods of the subject

Layout
Quick Start Guide and Modification 99

Section 5.3 (General)

On Remarks

Other (ONE) In addition to the complete installation, it is not necessary to click on the Data (Advanced) or
Layout button (Optional)

Favorites ()çáðàííî) It allows you to make a list of the most convenient applications. × òîáû äîáàâèòü ñâîéñòâî íà ýòó
âêëàäêó, íåîáõîäèìî âûáðàòü åãî íà ëþáîé äðóãîé âêëàäêå îêíà Properties (Ñâîéñòâà), íàæàòü
ïðàâóþ êíîïêó ìûøè è èç êîíòåêñòíîãî ìåíþ âûáðàòü êîìàíäó Add to Favorites (Äîáàâèòü â
Èçáðàííîå)

Ðèñ. 5.10. Îêíî Properties

To change an object property, open the Properties window and go to the line containing this property. The property
value will be displayed in the column located to the right of the property name, and to edit its value, use the input field
located above the list of all properties of the object. When changing the property value, the options described in the
table are possible. 5.4.
100 Chapter 5

Section 5.4. Decommissioning of property in relation to type

Satisfaction Build-up of a field for construction

Fully Accessible Only for the Future For more information, please contact us. Information in the field of integrating skewers.
For example, this is the only way to do this. 5.10 Independently valid BaseClass ( Design
Keys). Additional independent modalities

Own operation moderation For more information, the product is efficient, and in addition, it has a large amount of quality
and is fully implemented. Example of a proprietary system Completely Caption ( )Àäïèñü)

Additional options for more options for Ïðè âûáîðå òàêîãî ñâîéñòâà â ïîëå ââîäà çíà ÷ åíèÿ ïîÿâëÿåòñÿ êíîïêà ðàñêðûòèÿ
real estate purposes. ñïèñêà, êîòîðàÿ ïîçâîëÿåò èñïîëüçîâàòü äëÿ ââîäà íîâîãî çíà ÷ åíèÿ ýëåìåíòû ñïèñêà. Íà
ðèñ. 5.11 LIST FOR MODIFICATION OF OPERATION Alignment ( Return)

Playback options with the help of an And, in order to do this, you need to be able to get a good result. Íà ðèñ. 5.12 Detailed
online window view of the submarine window for the change of ownership Backcolor

(Answer Background)

Ðèñ. 5.11. Selecting an option to access a list from a list


Quick Start Guide and Modification 101

To the left of the property input field are four buttons that are designed to perform the functions described in the
table. 5.5.

Section 5.5. Properties button of the Properties window

Button Remarks

Operational panel for advanced viewing in the field of operation

Pressing the button to save the price of the device

Allows you to expand the range for completing the operation.

Direct zoom window Zoom (Edit)

Ðèñ. 5.12. Setting up the property Backcolor With the use of a long-range window Öâåò

Accessories, Options with Tools


In the process of creating a form, you can move, delete objects, or change their sizes and properties.
102 Chapter 5

Introduction to Tools
To control an object, you first need to select it. To select one object, just click on it. To select multiple objects, do one
of the following:

❒ press the <Shift> key and, while holding it down, click we-
I sew alternately on all allocated objects;

❒ select the Select Objects button on the toolbar


Comrade Form Controls. Set the pointer to the form. Without releasing the mouse button, draw a selection frame
so that all the necessary objects are inside it.

3 NOTE
The second method is applicable if all selected objects are placed in the form of a compact group.

To select all the objects in the form, you can use the Select All command of the Edit menu or the key combination
<Ctrl> + <A>. After the objects are selected, you can manage them as a whole.

Removal of accessories
To deselect all objects of the form, click outside the selected objects. To deselect individual objects, follow these
steps:

1. Press and hold the <Shift> key.

2. Click one by one on the objects from which you want to deselect.

Replacing Features in a Form


Visual FoxPro allows you to move one or more form objects at the same time both with the mouse and with the arrow
keys. The use of arrow keys is used when precise positioning is required, since a single keystroke causes the object
to move one pixel.

If you want to move objects over a long distance, you can combine both of these methods: first move the objects with
the mouse, and then use the arrow keys to set their exact location.

Removing Features from the Tools


To remove selected objects from a form, do one of the following:

❒ in the Edit menu, select the Cut command;

❒ press the <Backspace> key;

❒ press the <Del> key.


Quick Start Guide and Modification 103

Changing the Dimensions and Accessories


To change the size of one object selected in the form, you can use control handles, which are black squares on the
corners and sides. If you want to set the exact dimensions of the object, it is better to use the properties

Height and Width determining its height and width, respectively. To do this, open the Properties window and use the
keyboard to enter the required values ​in the property fields.

To improve the appearance, the objects placed in the form are aligned relative to each other and the mesh of the
form. For alignment, you can use the menu command Format (Format), as well as the Layout toolbar, which contains
the buttons that are most often used when aligning objects and changing their sizes.

In the table. 5.6 shows all the alignment commands of objects of the Format menu, and in table. 5.7 - commands for
changing their sizes.

Section 5.6. Promotional Features

Ê Remarks

Align Left Sides (Ïî â ð ð Automatically selects an option for a simple, indirect option.
þ ð ð)

Align Right Sides (ð Ï ð ð ð Automatically selects the necessary options for the automatic repair of the
ð þ þ þ) product.

Align Top Edges (âî â ð â þ Automatically selects the latest accessories for the most modern version of the
þ þ þ) product.

Align Bottom Edges (Ï í æ þ Automatically selects a new option for a simple upgrade
þ þ þ þ)

Align Vertical Centers (Live Automatically selects for automatic operation


Center)

Align Horizontal Centers (Live Automatically selects for a wide range of areas
Center)

Center vertically Retrieving an online accessory online retailer


(For automatic)

Center horizontally Retrieving an Online Accessory Accessory Business Application


(About the Center)

Section 5.7. Changing the Measurement of Features

Ê Remarks

To fit The option is available for the product as well as the optional option for the optional product.
(Ðððíí))

To Grid Complies with the compatibility with the network


(Short)

To tallest Installs a wide range of accessories for a quick and easy access to a variety of products
(On top)
104 Chapter 5

Section 5.7 (General)

Ê Remarks

To Shortest (Short) Installs a wide range of accessories for a quick and easy access to a new product.

To widest Installing the longest accessories for the longest possible extension.
(Ë ë è è)))))

To Narrowest Installing a long version for a long, easy-to-use quick turnaround


(Shortcut)

To control the distance between the selected objects in the horizontal and vertical directions, the following additional
options are used for the Horizontal Spacing and Horizontal Spacing commands (Table 5.8).

Section 5.8. Features of the Horizontal Spacing è Vertical Spacing

Îïöèÿ Action

Make Equal (Optional) Installing the optional installation options for the optional

Increase (Note) Allows you to select the option to select an option.

Decrease (Óìåíüøèòü) Change the option to select an option.

The Format menu also contains commands that control the display of an object in a form (Table 5.9).

Section 5.9. Format Menu Format

Ê Action

Bring to Front (Ïîâåðõ) Owner's choice of a simple modern complex of objects

Send to Back (Return) Owner's Manual Selection of a Lower Integrated Form

Networks

For accurate positioning of objects in the form, it is convenient to use the grid, which is displayed on the screen when
you select the Grid Lines command of the View menu. The grid cell size in the horizontal and vertical directions is set
using two input fields in the Set Grid Scale dialog box (Fig. 5.13). To open it in the Format menu, use the Set Grid
Scale command.

When the Snap to Grid option is set in the Format menu, you cannot position the object in any place on the form. All
operations of placing objects, their movement and resizing will be performed taking into account the size of the mesh
cell.
Quick Start Guide and Modification 105

Ðèñ. 5.13. Long-distance window Set grid scale


For network settings

3 NOTE
The grid lines set in the form by the Grid Lines command of the View menu are not visible when the form is executed.

Changing the number of options when using the


information in the field
When entering information into the form fields, the transition from one field to another is performed using the <Tab>
key in accordance with the order of objects specified in the form. It may differ from the actual location of the objects.

Each new object added to the form is assigned a number that is not associated with its actual location in the form and
determines only the order in which the object is placed in the form. It is one more than the maximum number of form
objects.

Visual FoxPro supports two modes of setting the traversal order of objects - interactive and from the list. The choice of
which mode is used is carried out using the commands of the Tab Order submenu of the View menu.

Online Processing
To view the serial numbers of objects, select the Tab Order command in the View menu, and then in the opened
submenu the Assign Interactively command. As a result, the form will have the form shown in Fig. 5.14. A square
appears in the upper left corner of all the objects of the form indicating its bypass number.

To specify a new order of traversal of objects in the form, follow these steps:

1. Click on the objects in the form in the order in which they should be selected when you press the <Tab> key.

2. After completing the determination of the order of traversal of objects, click anywhere in the form.
106 Chapter 5

Ðèñ. 5.14. To help you get more information about your product

Ðèñ. 5.15. Long-distance window Tab order


Quick Start Guide and Modification 107

Use the list of options


When you select the Assign by List command of the Tab Order submenu of the View menu, the Tab Order dialog box
opens, in which form objects are placed in accordance with the current order of traversing objects in the form (Fig.
5.15).

Using the By Column and By Row buttons, you can set the order in which objects are traversed by column or row,
respectively. In addition, you can define your own crawl order by arranging the list items accordingly. To move the list
items, click the button located to the left of the object name and move it to the desired place in the list of objects.
108 Chapter 55
Chapter 6

Online Tools

In the previous chapter, we looked at creating a form using the form wizard. In this chapter, consider creating a form
in the form designer window.

Close-up design
Any form in Visual FoxPro consists of objects, each of which has characteristic properties. For any object, you can
specify the actions performed by the program when certain events occur. The process of creating a form in the form
designer consists in placing objects in the form and defining properties, as well as related events and actions.

To open the form designer window when creating a new form, use one of the following methods.

❒ Run the command New ( New) menu File ( File). In the dialog that opens
the window New ( New) select an option Form ( Form) and click New file
(New file).

❒ Press button on the standard Visual FoxPro toolbar. In-


dialog box New ( New) select an option Form ( Form) and click New File ( New file).

❒ To place the created form in the project, select the tab Documents ( Before-
kumenty), go to the group Forms ( Forms) and click New ( New) project windows. Then in the window that opens Ne
Form ( New form) click the button of the same name.

In fig. Figure 6.1 shows the form designer window containing toolbars
Color Palette ( Color palette), Layout ( Location) Form Designer ( Form Designer) and Form Controls ( Form controls)
used when working in the constructor. A new form has been placed in the designer window that you can work with.

In the event that the necessary toolbars are missing, select the appropriate menu commands to display them on the
screen View ( View) (Fig. 6.2) or select the check boxes for selecting toolbars in the dialog box Toolbars

(Toolbars).
110 Chapter 6

Ðèñ. 6.1. Close-up of tools for the installation of tools

Ðèñ. 6.2. Installing Meters in Utilities View


For on-screen display

Toolbar Form Controls ( Form controls) is used to place objects in the form. A brief description of the buttons on this
panel is given in table. 6.1. The purpose of these buttons will be discussed in more detail below.
Online Tools 111

Section 6.1. Form Controls Panel Buttons

Button Application Remarks

Select Objects Owner's guide. You can select one of the options

View Classes You can select one of the following for your design.

Label Creates a Text Tool

Text Box (More) Creates in the field of water

Edit Box (More Editing) Creates in the field of field

Command Button (Button) Creates in the control button

Command Group (Button Button) Displaces in the button group

Option Group (Option) Creates a plug-and-play device

Check Box Creates in the file box

Combo Box (Listing List) Creates a List in a List

List Box (List) Creates a List

Spinner (Ñ ÷ êò ÷ êê) Creates in a field in a field in front of a window

Grid (Òàáëèöà) Create in the field for the replacement of the field in the front of the
unit

Image (Image) Sizes in the picture

Timer (Òàéìåð) Creates a product type of equipment

Page Frame (On) Pluggable in the box with the switch

ActiveX Control (OleControl) Creates an OLE Feature


(OLE-function)

ActiveX Bound Control This is a compatible OLE device, a general field of technology.
(OleBoundControl)
(ActiveX-Bound)

Line (Ëèíèÿ) Creates in the company

Shape Creates in your project


112 Chapter 6

Section 6.1 (General)

Button Application Remarks

Container (Container) Creates in the company

Separator (Separator) Dimension on the panel of the separator


button

HyperLink (Link) Creates a component and combines it with a quick disconnect.

Builder Lock (Accessory Lock) This option allows you to automatically select the option to change the
option.

Button Lock (Button) The on-screen button on the front panel

Toolbar Form Designer ( Form Designer) contains toolbar buttons Form Controls ( Form controls) Color palette

(Color palette), Layout ( Location). Using this panel, you can perform some additional actions to manage the form.
Brief assignment of buttons of this toolbar is given in table. 6.2.

Section 6.2. Toolbar for Form Designer

Button Application Remarks

Set Tab Order (Set Options) Disconnecting the quick method in the process of setting
up the product method

Data Environment (Product Data) Turns on the optional modem for your device.

Properties Window Sets the window to the new window.


ôîðìû

Code Window Provides a quick view of the original code of the tool.

Form Controls Toolbar (Form Controls Selects the Control Panel (Form Controls) for a user
Toolbar) interface.

Color Palette Toolbar (Color Palette Toolbar To change the color palette, select the Color Palette.
(Color Palette))

Layout Toolbar (Layout of the Layout Adds a Layout Panel to the User Panel (Add-on)
(Implementation))

Form Builder (Build Tools) Installs a new tool.

Auto Format (Auto) Select the option to automatically select an option for
your own options.
Online Tools 113

It is convenient to use the toolbar to align objects placed in the form. Layout ( Location). Brief assignment of buttons
for this panel is given in table. 6.3.

Section 6.3. Buttons for the Layout

Button Application Remarks

Align Left Sides (Ïî â ð ð þ ð ð) Automatically selects an option for a simple, indirect option.

Align Right Sides (ð Ï ð ð ð ð þ þ þ) Automatically selects the necessary options for the automatic
repair of the product.

Align Top Edges (âî â ð â þ þ þ þ) Automatically selects the latest accessories for the most modern
version of the product.

Align Bottom Edges (Ï í æ þ þ þ þ þ) Automatically selects a new option for a simple upgrade

Align Vertical Centers (Live) Automatically selects objects while they are in progress.

Align Horizontal Centers (Business Automatically selects accessories


Center)

Same Width (Custom Width) Installing optional accessories for free accessory tools

Same Height (Full Height) Installs the option for the full range of optional accessories.

Same Size (Custom Size) Installs optional accessories and complete options for optional
features.

Center Horizontally (The Center Retrieving the optional accessories for the online connection to
Horizonally) the factory

Center Vertically (Online) Retrieving an online accessory for a quick connection to a


factory

Bring to Front (Ïîâåðõ) Owner's choice of a simple modern complex of objects

Send to Back (Return) Owner's Manual Selection of a Lower Integrated Form

Creating a company
The process of creating a form includes the following steps:

❒ setting form parameters;

❒ determination of the environment, i.e., the choice of tables and settings used in the form of
new connections between them;

❒ placement in the form of objects: text, fields of various types, lines, drawings,
control buttons;

❒ setting properties of objects placed in the form.

Let's start creating a form in the form designer by setting its parameters.
114 Chapter 6

Configuring the options


The form, like all the objects in it, has properties that can be used to set its size, coordinates of the upper left corner,
border style, title, color, etc.

Form parameters are configured in the window Properties ( Properties), to open which, position the cursor on the
surface of the form free from objects, right-click and select the command from the context menu Properties

(Properties).

Implementation of the company


The new form is by default located in the upper left corner of the main Visual FoxPro window. To change its position,
you can use the properties Left ( Left) and Top ( Top), indicating the distance in pixels from the left and top edges,
respectively, as well as the mouse. When using the mouse to change the position of the form, position the cursor on the
heading of the form, click the mouse button and holding it, move the form in the designer window to the place of its
intended location (Fig. 6.3).

Ðèñ. 6.3. Additional Tools for the Visual FoxPro Main Window

You can use the properties to resize the form. Height ( Height) and Width
(Width), determining the height and width of the form, as well as the mouse. Using
Online Tools 115

Mouse to resize the form, place the cursor in its lower right corner. When it becomes a bidirectional arrow, click and
hold the mouse button and resize it. Having set the required size, release the mouse button.

WITH OVET

To place the form in the center of the main Visual FoxPro window, set the property in the properties window AutoCenter ( Auto
Center) True.

Heading Tools
To set the title text of the form in the title bar, use the property
Caption ( Caption) property windows. Open the window to edit the title.
Properties ( Properties), highlight the property Caption ( Caption) and in the input field that has become active, enter
the title of the form.

If you want the form to not contain a title at all, set the property TitleBar ( Title bar) value Off

Style Details
The form border style is set using the property BorderStyle ( The style of the frame) and can take the values
​described in the table. 6.4.

Section 6.4. Finishing the Features of the Company

Note Recording

0 - No border (Give Border) Take a Note

1 - Fixed Single (Optional) Variable Modification

2 - Fixed Dialog (Auto Dial) Changing the keypad

3 - Sizable (Default) (Change (Override)) Changing the frame (Change the size of the application)

Property BackColor ( Background color) allows you to set the background color of the form.

Property WindowState ( Window status) determines the size of the form when it is called and can take one of the
values ​described in the table. 6.5.

Section 6.5. Property Management Windowstate

Note Recording

0 - Normal (Îáû ÷ íîå) Subject to change, optional accessory equipment

1 - Minimized (Minimized) The site is fully open

2 - Maximized (Full Set) for Full Screens


116 Chapter 6

Sequence of companies
When creating a form intended for editing or viewing information contained in tables in the form designer, you must
define
environment i.e. set tables used in the form and establish relationships between them.

3 NOTE
When creating forms using the wizard and placing objects on the form using the builder, the environment is created by
Visual FoxPro without the participation of the developer.

When determining the environment, you must perform the following steps:

❒ add all the tables used in the form;

❒ Set indexes for tables

❒ Establish the relationships between the tables needed to create the form.

All this information related to the environment is stored in the form description file.

Use the dialog box to create a form environment. Data environment


(Environment), which can be opened in one of the following ways:

❒ choose team Data Environment ( Environment) menu View ( View);

❒ push button Data Environment ( Environment) on the toolbar


Form Designer ( Constructor of forms);

❒ select the form context menu command Data Environment ( Wednesday is


zheniya).

3 NOTE
When you open the Data Environment window, the corresponding item is added to the main menu.

To work in a window Data Environment ( Environment) you can use the commands from the menu DataEnvironment ( En
or context menu (Fig. 6.4), allowing you to add tables to the environment, view them in the mode Browse ( Browse),
open the environment properties window for setting various parameters.

To add a new table to the environment, you can do one of the following:

❒ select the context menu command Add ( Add);

❒ choose team Add ( Add) from the menu Data Environment ( Environment).

This opens a dialog box. Add Table or View ( Add a table or data view) (Fig. 6.5) containing a list of tables in an open
database. Option Views ( Data Views) Areas Select ( Choice) allows you to place data representations created in the
database in the environment. If the desired table and view is not in the list of the open database, click Other ( Others)
and using the dialog box that opens Open ( Open), find the desired object.
Online Tools 117

Ðèñ. 6.4. Long-distance window Data environment with contact meme

Ðèñ. 6.5. Long-distance window Add Table or View

After placing the tables in the environment of the form, you need to organize the data in the tables. To do this,
follow these steps:

1. Select the table in which you want to organize the data.


118 Chapter 6

2. Open the table properties window. To do this, position the cursor on it, click
right mouse button and select the command from the context menu Properties
(Properties).

3. Highlight Property Order ( Streamlining).

4. In the property correction field, click the list expansion button. From the list of
table dexes, select the one by which you want to arrange the data in the form. When placed in the form of linked
tables, they are transferred to the environment of the form along with the relationships established in the database.
You must ensure that communications are established properly. To do this, follow these steps:

1. Select the line joining the tables. In this case, in the window Properties ( Properties) bu-
The properties characterizing the relationship established between the tables will be displayed.

2. Check which of the tables is parent and which one is relative


niyu to her. To do this, view the properties ChildAlias ​( Child table) and ParentAlias ​( Parent table).

3. See the expression used to link tables using


property RelationalExpr ( Expression of relationship). It must match the expression used to create the index by
which the tables are linked. In fig. 6.6 presents a dialog box Data Environment ( Environment) with tables placed in it Cu
and Phoncust and an open properties window for interconnection between tables.

Ðèñ. 6.6. Long-distance window Data environment Changing Tables


Online Tools 119

Adapter for the field


The cursor adapter supports a wide range of data sources used to create the form:

❒ direct connection to the database;

❒ Open Database Connectivity (ODBC);

❒ ActiveX Data Object (ADO);

❒ Extensible Markup Language (XML).

The most convenient way to create a cursor adapter is to use the cursor adapter builder by doing the following:

1. Open the window Data Environment ( Environment) in any convenient way.

2. In the window that opens, right-click and select in the context


Mr. menu command Add CursorAdapter ( Add cursor adapter). In the window Data Environment ( Environment),
an object appears whose appearance resembles a table added to the environment of the form, but has the name

Cursoradapter1.

3. Place the cursor on this object, right-click and select


in the context menu the command Builder ( Builder). A dialog box opens CursorAdapter Builder ( Cursor adapter
builder).

4. Using the builder tabs, configure the cursor adapter settings


(Fig. 6.7), then close the window CursorAdapter Builder ( Cursor adapter builder) by clicking OK

Window CursorAdapter Builder ( Cursor adapter builder) contains three tabs:

❒ Properties ( Properties) - indicates the data source used in the adapter


cursor (Fig. 6.7);

❒ Data Access ( Access to data) - a team is being formed Select to select


n of the specified tab Properties ( Properties) of the source and data mapping scheme (Fig. 6.8).

❒ Auto-Update ( Auto update) - allows you to specify the automatic settings


Updating entries in the cursor adapter.

Tab Properties contains interface objects of the following purpose:

❒ field Class ( Class) - displays the name of the base class CursorAdapter, using
called when creating the object. The field is not editable;

❒ field Name ( Name) - allows you to specify the name of the chicken adapter being created -
litter;

❒ field Alias ​( Alias) - allows you to specify the name of the alias of the cursor adapter;

❒ check box Use DataEnvironment data source ( Use data source from
environment) - when the checkbox is selected, you can use a data source from the environment;

❒ check box Use connection settings in builder only ( Use connection settings
only in the builder) - when the check box is selected, the installation parameters are used only in the builder and
the program code for selecting data is not generated;
120 Chapter 6

Ðèñ. 6.7. On Properties The rear window of the rear accessory

❒ list Data source type ( Type of data source) - sets the type of data source
ny used in the cursor adapter: Native (Direct connection to a database), ADO, ODBC, XML. Depending on the
value selected from this list, the tab is transformed, allowing you to specify the data source. For example, when
you select Native field appears Database ( Database), in which the name and location of the database are
indicated, and when ADO or ODBC is selected, fields for selecting a data source appear (Fig. 6.7).

Tab Data Access ( Access to data) (Fig. 6.8) contains a field Select command
(Select command), in which you can manually or using the builder launched by the button located above the field Build
( Build), form a team
Select to select data from the specified tab Properties ( Properties) of the data source.

Field Schema ( Scheme) and the button located above it Build ( Build) allows you to specify the cursor structure.

In fig. Figure 6.9 shows a form created using a cursor adapter whose data source type is ODBC.
Online Tools 121

Ðèñ. 6.8. On Data access Optional accessory

Ðèñ. 6.9. Support, use and accessories for the exterior


122 Chapter 6

Optional accessories for quick setup

Now consider the sequence of actions to determine the environment and set the basic properties of the form:

1. Open project Sales

2. Select tab Documents ( Documents), go to the group in the project window


Forms ( Forms) and click New ( New).

3. In the dialog box that opens New Form ( New form) select an option New
Form ( New form). The form designer window opens to create a new form.

4. Open the form environment window Data Environment ( Environment) by selecting


the team Data Environment ( Environment) menu View ( View).

5. To place a table in an environment, select the command Add ( Add)


from the menu Data Environment ( Environment).

6. In the dialog box that opens Add Table or View ( Add table or pre-
data placement), select the table for which you are creating a form from the list of tables in the open database,
and click OK

7. Open the properties window of the table located in the environment window. For this,
place the cursor on it, press the right mouse button and select the command from the context menu Properties
( Properties).

8. Highlight Property Order ( Streamlining). To organize data in a form


in the property correction field, click the button for expanding the list and from the list of table indices select the
index by which you want to organize the data.

9. Close the environment definition window.

10. To set the properties of the form, place the cursor in the form, press the right button -
mouse and select the command from the context menu Properties ( Properties). Window opens Properties ( Proper
In its upper list, indicating the name of the object for which the properties are being set, contains text Form1 ( Form
1).

eleven. In the window Properties ( Properties) change the property Caption ( Inscription) by typing in tech-
text box form header.

12. Set the background color of the form. To do this, use the form property Backcolor
(Background color). Click on it with the mouse. Then click the button located on the right side of the property
editing field and in the dialog box that opens Colour Select the color you want to use for the background.

thirteen. Property AutoCenter ( Autocenter) should matter True so that


the form was located in the center of the screen.

14. To resize the form, position the cursor in its lower right corner.
When it becomes a bidirectional arrow, click and hold the mouse button and resize it. Having set the required
size of the form, release the mouse button.
Online Tools 123

fifteen. Change properties FontName ( Font Name) FontSize ( The size


font) by selecting the appropriate font from the installed on your computer and its size.

sixteen. Save the form to disk.

Partitioning in the form


After the parameters of the form are defined and the tables used are located in the environment, you can proceed
with the placement of objects in the form.

Use the field and use the optional tool.

To place table fields and labels in the form in the form designer, you can use the form builder.

To start the form builder, select the command Builder ( Builder) context menu form or click Form Builder ( Form
Builder) on the toolbar Form Designer ( Constructor of forms). A dialog box opens Form Builder ( Form builder)
containing two tabs (table. 6.6).

Section 6.6. Designing the Window Builder Form Builder

On Remarks

Field Selection (Other field), which will require a change in the field (Fig. 6.10)

Style (Style) Modifying the Product Details of a Tool (Fig. 6.11)

Ðèñ. 6.10. Option for choosing a field that is suitable for use in the field
with the optional tool
124 Chapter 6

Ðèñ. 6.11. Option for optional accessories,


Replaceable Accessories

Using the tab Field Selection ( Field Selection) dialog box Form Builder ( Form builder), create a list of table fields
placed in the form. To do this, from the top list of the area Databases and tables ( Databases and tables) select the
required database, and from the bottom - the table, the fields of which are placed in the form. Then from the list Available
fields ( Available fields) transfer to Selected fields ( Selected fields) fields that you want to place in the created form. To
transfer fields, use the buttons located between the lists.

Having formed the list of fields, go to the tab Style ( Style). Using the list located here Style ( Style), specify the style of
design of objects placed in the form. After completing the settings on both tabs, click OK Fields and inscriptions to them
will be placed in the form (Fig. 6.12).

Ðèñ. 6.12. Accessories, Accessories, and Accessories


Online Tools 125

3 NOTE
The builder can place all fields in the form, including also fields of type General.

3 NOTE
When adding objects to the form using the builder, there is no need to place the tables in the environment window, since
the builder himself will place them there.

Direct Infomation
Placement in the form of text (headings, inscriptions to fields, explanatory information) is carried out using the button Lab
( Label) located on the toolbar Form Controls ( Form controls).

To place text, follow these steps:

1. Press button Label ( Label) on the toolbar Form Controls ( Items


management form). If this panel is not displayed on the screen, select View ( View) team Form Controls Toolbar ( Fo
Control Panel).

2. Place the mouse pointer over the intended text location


object and click. An object appears in the form, the name of which contains the word Label1.

3. To open the properties window of the created object, select it and select from the context
menu command Properties ( Properties). A window will open Properties ( Properties).

4. The background of the text object is determined by the property BackStyle ( Background Style). If
you want the background of the text to not differ from the background of the form, set the property
BackStyle ( Background style) value Transparent ( Transparent).

5. The label text is set by the property Caption ( Caption). Highlight this property,
then in the property input field, enter the desired text information and press <Enter>.

6. Set using properties FontName ( Font Name) and Fontontize


(Font size) type and size of the font.

7. Using property ForeColor ( Label color) set the color of the text information
Mats.

8. Adjust the size of the object to fit the entire label. For this
use highlight markers or set value True ( True) for a property AutoSize ( Auto Size).

9. To allow label text to span across multiple lines, set


nie True ( True) for a property WordWrap ( Hyphenation).

The Great Water


To display information from tables in a form, fields of various types are used. The simplest type of field is an input
field. To place an input field on a form, follow these steps:

1. Press button Text Box ( Entry field) on the toolbar Form


Controls ( Form controls).
126 Chapter 6

2. Click in the place of the form where you want to place the input field.

3. Open the properties window of the created object.

4. To associate the created field with the table field, select on the tab Data ( Dan-
ny) property ControlSource ( Data source). In the property input field, use the list expansion button and from the
list of all fields in the open table, select the field that you want to add to the form (Fig. 6.13).

Ðèñ. 6.13. Developing a field with a field

5. Using property Alignment ( Alignment), set the alignment option


information in the field: center, left, right margin of the field or automatic alignment depending on the type of data.

6. To set the style and color of the field border, use the properties BorderStyle
(Frame Style) and BorderColor ( Frame color) respectively.

7. Using property DisabledBackColor ( Inactive field background color)


those are the background color of the inactive field.

8. Applying Property Comment ( Description), you can specify a brief description of the
value of the placed object. This description will be useful when developing the application and its maintenance.

9. Using properties FontName ( Font Name) and FontSize ( The size


font), specify the font used in the display of information and its size.
Online Tools 127

10. Using property ForeColor ( Label color) set the color that will be
Information in the input field is displayed.

eleven. To display input fields in the specified format, use the property
Format ( Format).

Valid formats and their purposes are given in table. 6.7.

Section 6.7. New Year's Day

Êîä Remarks

! Design a site for real estate registration

$ Turns on the current current mode.

^ Find out if you are looking at

A Displaces the only tactical text

D FOR EDITING A TYPE OF DATA FOR USING THE FUNCTION OF THE PRODUCT SET DATE ( ð ð ð,
BRITISH, GERMAN è ò. ä.)

E Editing, Expanding, and Finishing (BRITISH) Data

F For using the Varchar type, do not overlook it.

K It covers the entire field of Korea, as well as in the long-term field.

L This option allows you to select the next option in the field of water.

M Assigning a few more options to save time

R Consists of a front-end for the front and rear spacing.


InputMask ( Release page). In the middle of the year, it’s only a short, long-term experience.

T More information and more details on the subject

Ys To get a quick start, use Windows to install it.

Yl To complete the installation of Windows, use Windows to install it.

12. Property InputMask ( Input mask) allows you to specify a template. Symbols that
Several can be used in the template, are presented in table. 6.8.

Section 6.8. Ready-to-use products Inputmask

Êîä Remarks

! Design a site for real estate registration

# If you want to enter the option, the user and the character

$ Turn on the current active mode (optional when using the command). SET CURRENCY). To change this,
use the next option for the field. Other important features and best practices ( SET CURRENCY), Separate
Simulator ( SET SEPARATOR) AND SIMILAR DIGITAL SIGNAL ( SET POINT) Take a look at the
alternatives

. Assist in the use of continuous current


128 Chapter 6

Section 6.8 (General)

Êîä Remarks

, Optional accessories for the building and construction of a complete range of quick connections

$$ This can be achieved by using the same method as the next step.

9 In the case of a further advantageous result, you will repeat the only function. If you want to, you can
play the game again and see

A Displaces the only tactical text

H Accessible only for advanced simulators

L If only Y, Y, t, T, n, N, f, F are used, you can set the value to True (Stop) to set the value to the value.

N DISCUSSION ONLY ONLY OTHER AND BOOK

X More information on simulators

Y You can only enter y, Y or n, N For a false value of True (Removing) or False (Fulfilling it)

Ðèñ. 6.14. Getting Started in the Fast


Directly Owned Equipment StatusBarText
Online Tools 129

thirteen. To create a field in which information should be available only for


reading, you must set the value of the property ReadOnly ( Read only) equal True ( True).

14. Using property SpecialEffect ( Special effect), set the style to


field fields of the three proposed options: normal, with the effect of volume, or assuming a volumetric
appearance when you move the mouse cursor over it.

fifteen. For the field, you can specify long explanatory labels displayed in the line
state when set on the mouse cursor field. To do this, use the property StatusBarText ( Status bar text). In fig.
6.14 presents a form with a field Client code, in determining which this property was used.

sixteen. Visual FoxPro allows using the property ToolTipText ( Tooltip text)
Create a short explanation text that appears below the cursor when it is set on the field. To display the text of
the specified explanation, set the property ShowTips ( Show tooltips) form value True ( True).

17. When adding a new record to the default field, you can enter the most frequent
then the values ​encountered. To do this, use the property Value ( Value).

Use the option to create a field for water


In Visual FoxPro, for most objects that are hosted on the form, there are object builders to help you configure their
properties. Consider using the builder to create an input field in the form.

To place an input field in the form using the builder, follow these steps:

1. Press button Text Box ( Entry field) on the toolbar Form controls
(Form controls).

2. Click in the place of the form where you want to place the field. In this field
The input will accept the default size. If you want to determine the size of the input field when placing it, click the
mouse button and, without releasing it, draw a frame of the required size.

3. To start the builder, right-click and select the command


context menu Builder ( Builder). A dialog box opens Text Box Builder ( The builder of the input field) (Fig. 6.15)
containing tabs Format
(Format), Style ( Style) and Value ( Value). Using this dialog box, you can specify the format, style of the field and
associate it with the table field.

3 NOTE
Using the builder, you can not only place a new field, but also change the properties of a field already placed in the form.

4. Tab Format ( Format) contains a drop-down list Data Type ( A type


data), using which you can set the data type of the field. The tab also contains the flags described in the table.
6.9.
130 Chapter 6

Ðèñ. 6.15. On Format Make sure you fill in the field

Section 6.9. Formatting the Format Buttons

End Remarks

Enable at run time. Install the option to use the field to start up the program. Additional function with
a fully-equipped accessory Enabled ( Long)

Alphabetic characters only (à ü ü á à Disassembled with a complete guide, which also includes a fully-fitted
à) ô))) installation. Format ( Press) to format A

Make read-only (complete read) User-friendly operation for remote operation in the field

Select on entry (Select an entry) When replacing the cover in the field, move the entire field in the middle

Hide selection (Squad) Installs a free accessory HideSelection ( Squeeze), optional add-on
Subsequent Access
In this case, focus is on the other hand.

Display leading zeros (Zero Drive) This is done when you are using a new field in the field.

At the bottom of the tab is a drop-down list for specifying a data entry template. You can enter any of the possible
templates or select from the list.

5. By setting options on the tab Format ( Format), go to the tab Style


(Style) (Fig. 6.16) to set the display style of the created field. This tab contains four parameters (Table 6.10).
Online Tools 131

Section 6.10. Customizing Style Options

ÏÏÏì Remarks

Special effect (Special effect) This option enables 3D (Optional) и Plain (Flat).
3D view (3D)
Beyond this, you will need to take a look at the video. Assigning a Property SpecialE
( Special Feature)

Border (Box) Further selector will help to install one of the two keys: Single or None.
Assigning a Property BorderStyle ( Stamp)

Character alignment (Characterization) This will help you to save money by turning on the drive and using it in
conjunction with Alignment
(Return)

Size text box to fit (User Guide) And with the optional remote control, the use of the auto-coupler is also
possible.

Ðèñ. 6.16. Short-term, for installation of parameters of a floor

6. To associate an input field with a table field, go to the tab Value ( Znacho-
v) (Fig. 6.17). From the dropdown Field name ( Field name) select the table field with which you want to associate
the input field.

7. After setting all the parameters to complete the formation of field properties
enter click OK

WITH OVET

To automatically call the builder when placing objects in the form, you must click the Builder Lock button on the Form Controls
toolbar (Form Controls).
132 Chapter 6

Ðèñ. 6.17. Development of a field with the field of construction

Enlargement
Fields Edit Box ( Editing field) are very convenient for editing large symbol fields and Memo fields. To place an edit
field on a form, follow these steps:

1. Press button Edit Box ( Edit box) on the toolbar


Form Controls ( Form controls).

2. Click in the place of the form where you want to place the edit box.

3. Open the properties window Properties ( Properties) for the hosted object.

4. When using fields of this type to view and edit fields


large size, in its right part you can place a vertical scroll bar designed to view information that did not fit in the
viewport. For this, it is necessary in the property ScrollBars ( Scroll bar) set value Vertical ( Vertical). When setting
the value None

(No) The scroll bar of the field will be absent.

The remaining properties of the edit field are similar to the properties of the input field, which were described earlier.

Control Buttons
As a rule, information on one record is displayed in the form fields. To view all records in a table, you must add a
means of moving through the records in the form. Visual FoxPro has convenient tools designed for these purposes -
buttons.

You can use two toolbar buttons to place control buttons on a form. Form Controls ( Form controls) (table. 6.11).
Online Tools 133

Section 6.11. Form Controls Panel Buttons

Button Application Remarks

Command Button (Button) Creating Advanced Buttons

Command Group (Button Button) Creating a Button

Changing the key buttons


To place in the form of a single button, follow these steps:

1. Press button Command Button ( Button) on the toolbar Form controls


(Form controls) and click at the location of the intended placement of the button to be created.

2. Open the properties window of the created object.

3. A button may contain text or a graphic image. While creating


buttons containing text, adjust the property Caption ( The inscription) by placing the text that will be displayed on
the button in the value input field. For example, when creating a button to close the form, enter Output.

4. When creating a button containing a graphic image, for


use the button Picture. Click the button to the right of the property value input field. As a result, a dialog box
opens. Open ( Open), using which, you can select a file on disk containing the image. After selecting a file, click

Ok to transfer the image to the button.

5. The button is placed on the form. Now it is necessary, using automatically calls
the method of the object that is clicked on the button Click ( Pressing), determine the actions performed by
clicking on this button. Display a list of all methods in the object properties window. To do this, in the window Propert
( Properties) select the tab Methods ( Methods).

6. Place the cursor on a method Click ( Clicking) and click. On the screen
a procedure window will open (Fig. 6.18).

7. Enter the commands that should be executed when you click on this button.
For example, when creating a button to exit the form, these may be the following commands using the function MES
():

* Request to exit the form


IF MESSAGEBOX ("Exit form?", 4 + 32 + 256, "Exit") = 6
_screen.ActiveForm.Release ()
ELSE
_screen.ActiveForm.Refresh ()
Endif
8. Close the procedures window. Button created.
134 Chapter 6

Ðèñ. 6.18. Method Method for Methods Click

Ðèñ. 6.19. Îáúåêò Commandgroup Editing


Online Tools 135

Editing Advanced Features


Some Visual FoxPro objects, such as CommandGroup ( Button Group) and
OptionGroup ( Switch) are compound objects since they contain several objects that have their own properties.

For working with compound objects, Visual FoxPro has a context menu containing the command Edit ( Edit), which
puts the object into edit mode and allows you to control the simple objects included in its composition: move them
inside the frame, resize, color, configure other properties. In editing mode, a shaded frame appears around the
composite object (Fig. 6.19).

To exit the editing mode, click outside the area of ​the composite object.

Creating a Button
You can use the tool to place a group of several buttons in the form of a group Command Group ( Button Group) on
the toolbar Form controls
(Form controls). The object created in this case is composite and has the property ButtonCount ( Number of buttons),
which determines the number of buttons included in its composition.

We will use this tool to place buttons on the table entries and exit buttons in the form of buttons.

1. To create a set of buttons, click Command Group ( Button Group)


on the toolbar Form Controls ( Form controls) and click where they are supposed to be placed on the form.

2. Open the properties window for the hosted composite.

3. Property ButtonCount ( The number of buttons) of the object determines the number
buttons placed in the object (default 2). Correct it by setting the required number of buttons, for example 5.

4. Use the mouse to increase the size of the frame surrounding the created object,
so that you can place all five buttons horizontally in it.

5. Put the object in edit mode. To do this, install chickens on it-


sor, right-click and select the command from the context menu
Edit ( Edit).

6. Selecting the buttons one by one, move them horizontally in one


line.

7. Exit edit mode by clicking outside the object area Commandgroup


(Button Group).

8. Adjust the size of the frame surrounding the composite object.

WITH OVET

To set the frame size of a composite object more precisely, select the property
AutoSize ( Auto Size) and set it to True.
136 Chapter 6

9. Open the properties window for an object of type CommandGroup ( Button Group). Click
the button for expanding the list at the top of this window (Fig. 6.20). Note that this list contains all the objects
placed on the form, as well as all the elements included in the compound object, under the names Command1,
Command2, Command3, Command4, Command5. By choosing items in this list one by one, you can change the
properties of each button.

Ðèñ. 6.20. Design Tool Type Commandgroup

10. Using property Caption ( Caption) of each element of a composite object,


name the buttons: First one Next one Previous, Last and Output.

eleven. To set the background color on which the buttons are located, use your-
state BackColor ( Background color) of the object CommandGroup ( Button Group). To match the background
color of the form, set the property BackStyle ( Background style) value Transparent ( Transparent).

12. Now you need to determine the commands that will be executed when
These are the buttons. To do this, opening the method procedure window in turn
Click ( Pressing) of each element included in the composite object, enter the following commands: For the
button First one:

* We go to the first record and update the information in the form


IF! BOF ()
Online Tools 137

GO TOP
Endif
_screen.ActiveForm.Refresh ()

For button Next:


* Go to the next record and update the information in the form
IF! EOF ()
SKIP
Endif
_screen.ActiveForm.Refresh ()

For button Previous:


* Go to the previous record and update the information in the form
IF! BOF ()
SKIP - 1
Endif
_screen.ActiveForm.Refresh ()

Ðèñ. 6.21. Business Keyboard Shortcut


138 Chapter 6

For button Last one:


* Go to the last entry and update the information in the form
IF! EOF ()
GO BOTTOM
Endif
_screen.ActiveForm.Refresh ()
For button Output:
* Request and exit if Yes
IF MESSAGEBOX ("Close the form?", 4 + 32 + 256, "Exit") = 6
_screen.ActiveForm.Release ()
ELSE
_screen.ActiveForm.Refresh ()
Endif

thirteen. After entering the commands, close the procedure windows.

14. A set of buttons to move through the table entries and exit the form
Dan. Run the form to execute on command Run Form ( Run form) from the menu Form ( The form). To move
through the table entries and close the form, use the buttons located at the bottom of the window (Fig. 6.21).

Subjecting to form
In the form you can place various images using the button Image ( Image) on the toolbar Form Controls ( Form
controls). To place an image on a form, follow these steps:

1. Press button Image ( Image) on the toolbar Form controls


(Form controls).

2. Place the mouse pointer in the place of the form where you want to place the
drag, and while holding down the mouse button, move the cursor diagonally so that you get a frame of the
desired size.

3. Open the properties window Properties ( Properties) for the created object. For this
select it and select the command in the context menu Properties ( Properties).

4. To specify the name of the image file, use the property Picture ( Iso-
Brain). Select this property or click the button located next to the field to enter the property value. A dialog box
opens Open ( Open).

5. Select an image file and click OK The image will fit


in the form (Fig. 6.22).

6. To configure the properties of a graphic object placed in the form, you can use
use property Stretch ( Scaling). It contains three values:

• Clip ( Crop image) - the image is placed in the form, keeping its original size;

• Isometric ( Scale, keeping the shape) - the image is scaled while maintaining the proportions;
Online Tools 139

• Stretch ( Scale by filling the frame) - the image occupies the size allocated to it without maintaining the
proportions.

WITH OVET

To set the image as the background of the form, use the property Picture ( Image) form.

Ðèñ. 6.22. Partitioning in the game

Partition in the type of facility General


We will consider the placement of a graphic field of type General using the example of a table Goods, containing a list
of goods database Sales The table has a field of this type with an image of the goods offered to the client.

1. To add a General graphic type field to the form, click


the button ActiveX Bound Control ( ActiveX object) on the toolbar Form Controls ( Form controls).

2. Place the mouse cursor in the location of the proposed field


type. Keeping the mouse button pressed, create a frame of the required size.

3. Open the properties window of the hosted object.


4. Using property ControlSource ( Data source), link the created
le with a table field. To do this, in the property input field, click the expand button
140 Chapter 6

list and from the list of table fields Goods select field gImage ( Image), which is of type General and contains
images of goods.

5. Run the created form by selecting in the menu Form ( Form) to


Manda Run Form ( Run the form). The form view with the General type field is shown in Fig. 6.23. If the picture
does not fit in the whole frame, increase the size of the frame in the form designer.

Ðèñ. 6.23. Commerce, General Field

USING YOUR FILES


For placement in the form of fields that can have only one of two valid values, objects of the type are used Checkbox call
checkboxes. Objects of this type can be used in form one at a time or in groups.

Consider the following example. The table with the list of customers may contain a field indicating whether this
customer is a regular customer. When the flag is set, the value in the field will correspond to 1, and when the flag is
reset, it will correspond to 0 (Table 6.12).

Section 6.12. Property Management Value Type feature Checkbox


Independent installation and installation

View the file on the screen Property Maintenance Value

10
Online Tools 141

Consider in detail the procedure for creating a flag for editing a field that indicates whether the customer is a regular
customer. This field is of type Logical and can be 0 or 1.

1. Open a form in the project designer window that allows you to view the list
customer juice.

2. Press button Check Box ( Check box) on the toolbar Form controls
(Form controls).

3. Click where you want the check box to appear. The object will be placed
in the shape of.

4. Open the window Properties ( Properties) for an object of type CheckBox ( Checkbox).

5. To associate a check box with a table field, change the property Control source
(Data source) by setting the Logical type field of the table as the data source Customer.

6. Enter properties in the field Caption ( Caption) text Regular customer. Dan-
This text will be placed to the right of the flag in the form designer window, as well as in the form.

7. Check box created. Run the form to run. To set the flag
For the current buyer, check the box (Fig. 6.24).

3 NOTE
For a checkbox placed in the form, you can change the properties ForeColor ( Label color)
BackStyle ( Background Style) and FontName ( Font Name), defining the color, background, font name.

Ðèñ. 6.24. Use in the type tool Checkbox


142 Chapter 6

This is an easy to use switch.


Type objects OptionGroup are called switches since they allow you to select one of several values ​of a field or
variable. Switches are widely used not only in Visual FoxPro, but also in other Windows applications. Type objects Option
( Switch) are composite objects containing elements endowed with their own properties, the main of which are given
in table. 6.13.

Section 6.13. Designing Basic Features of the Type OptionGroup

Satisfied Remarks

ButtonCount ( Optional option) Assists in supporting the accessory.

Style ( Style) Assigned to an optional switch

Left ( Word), Top ( Ñâåðõó) Remote Control Keys

BorderStyle ( Style Details) Style Details

Consider the process of creating a switch for viewing and editing a field indicating the country of residence of the
client. For example, this field can take one of three values: Russia · Ukraine · Belarus.

1. Open the form to enter the list of clients in the designer. Place in it
all fields except the field indicating the country.

2. Press button Option Group ( Switch) on the toolbar


Form Controls ( Form controls).

3. Click in the place of the form where you want to place the input field
country names.

4. Open the window Properties ( Properties) for the created object.

5. Adjust property ButtonCount ( Number of options). Set quantity


options equal to 3.

6. Associate the created form field with the table field containing the information
about the country of residence of the client. To do this, use the property Control source
(Data source).

7. Open at the top of the window Properties ( Properties) list of objects and select
from it the first switch option Option1 ( Option 1). In fig. 6.25 it is shown that in this case the object is highlighted
with a dashed frame, i.e., it goes into edit mode.

8. For an Option1 object (Option 1) change the property Caption ( Caption) by typing
the name of the country Russia.

9. For an Option1 object (Option 1) change the properties ForeColor ( Label color)
BackColor ( Background color), FontName ( Font Name), which determine the font color, the background color of
the switch, and the font name.
Online Tools 143

Ðèñ. 6.25. Option 1 option for options

Ðèñ. 6.26. Component, optional switch


144 Chapter 6

10. Change the properties for the other two objects in the same way.

eleven. Using the button Label ( Label) on the toolbar Form controls
(Form controls), create an inscription above the radio button Country.

12. Save the form with the switch located in it.

In fig. 6.26 presents a form with a switch used to enter information in the field Country.

Now, when you enter information into the list of customers in the table field containing the country of residence, the
value that you set using the switch will be entered.

3 NOTE
By default, the options in the switch are vertical. To arrange options horizontally, switch to the switch editing mode and, using
the mouse and arrow keys, change their location.

List
Visual FoxPro allows you to use different objects to display the same field in the form. For example, in the previous
example, a switch was used to enter information in the field indicating the country of residence. If there are many
values ​entered in the field, it is convenient to use lists called type objects ListBox ( List).

Lists in Visual FoxPro are used to display items in the form that can be specified using an array, menu, list of files,
table field values, etc. To specify the data source for the list, use the property

RowSourceType ( Type of data source), the values ​of which are described in table. 6.14.

Section 6.14. Property Management RowSourceType

Note Installation Date

0 - None Using the list of auxiliary functions with the help of methods AddItem ( Additional Information) AddListIt
( For more details)

1 - Value List of Charges in Standby, Optional in Short-circuit Charger

2 - Alias In case of direct use of advanced applications, please contact us. Fully Enabled Fully Equivalent
Operational Values Columncount
(The field is full)

3 - SQL Statement Lists additional, complete SQL statements


option

4 - Query (.QPR) The list contains additional, complementary, complementary instructions.


New request. Standard Charger File with Advanced qpr

5 - Array Quick Start Remote Assignment

6 - Fields Using the list of options for using the tools


Online Tools 145

Section 6.14 (General)

Note Installation Date

7 - Files The list contains the current folder. Â Satisfied


RowSource ( Installing the default list) Large format of the file format

8 - Structure In tandem with the direct use of advanced functional construction

9 - Popup LIST CONTAINS OPTIONS FOR EXTRA MEASURES

10 - Collection The list is easy to adjust if the unit is used, if it is in the case of a Collection

Type objects Listbox also have properties that were absent in the previously considered objects (table. 6.15).

Section 6.15. Accessory type Listbox


Accessory Accessories Optional Accessories

Satisfied Remarks

Columncount Separate Column in List


(Rule Column)

Firstelement Will give you a quick fix, will shorten the process in the list
(Real Estate)

NumberOfElements The method is based on the method of maintenance, Responses


(General Information) â list

Multiselect Injection, if you need to use it, select a more comprehensive view of the list.
(Homepage)

RowSource Set the default entry list


(Installing the last list)

We will place in the form intended for editing the list of clients from the table Customer, a list that we will use to enter
the name of the client’s country of residence. We will use a table as a data source for the list.

1. Open the form for entering customer information in the designer window.

2. Open the form environment window by selecting View ( View) team Data
Environment ( Environment). To add a table with country names to the environment of the form, select the
command Add ( Add) context menu. A dialog box will open on the screen. Add Table or View ( Add a table or data
view) in which you select a table Country.

3. Remove the entry field of the buyer's country of residence from the form, since
In this example, a list will be used to enter the value of the client's country of residence.

4. Press button List Box ( List) on the toolbar Form controls


(Form controls).
146 Chapter 6

5. Click on the location of the remote input field.

6. Open the window Properties ( Properties) placed in a list form.

7. To associate a created field with a table field Customer, select property


ControlSource ( Data source). In the input field for the property value, use the button to expand the list and from
the list of all fields of the open table
Customer select field cCountry.

8. Adjust property RowSourceType ( Type of data source) which


indicates the type of data source. Select a value from the list Fields ( Fields) because the list of countries is
located in the field Cnmountry tables Country.

9. Adjust property RowSource ( List data source) by setting in the field


input property value Country.CnmCountry.

10. Run the form to run. Now when editing the customer list
in field cCountry tables Customer the value selected from the list will be entered (Figure 6.27).

Ðèñ. 6.27. Use in the list

Listing Lists
Visual FoxPro has two kinds of lists. We considered one of them in the previous example. The second type of list is
an object of type Combobox or drop-down list. This type of list is convenient to use if there are a lot of input values,
and there is not enough space in the form for the location of the usual list.
Online Tools 147

We describe the procedure for creating a drop-down list for entering and editing the name of the city of residence of
the client in the table Customer. In contrast to the previous example, as a data source, we will use not a table with a
list of countries, but a row with the names of cities.

1. Open the form for entering customer information in the designer window.

2. Delete the list for entering the city name created earlier.

3. Press button Combo Box ( Drop-down list) on the toolbar


rumentov Form Controls ( Form controls).

4. Click on the location of the deleted object. Type object ComboBox ( Pop-up
list) will be placed on the form.

5. Open the window Properties ( Properties) for drop-down form


list.
6. Associate a drop-down list with a field cCity tables Customer, using
property ControlSource ( Data source).

7. From the list of possible property values RowSourceType ( Data Source Type
n list) select Value ( Value).

8. Enter property values ​in the input field RowSource ( List Data Source)
list of valid list items separated by commas: Moscow, Odessa, Novosibirsk, Sverdlovsk, Chernogolovka ( fig.
6.28).

Ðèñ. 6.28. Assigning a property list to a list


148 Chapter 6

9. Run the form to run. Now when you edit the shopping list,
leu to enter the table Customer the name of the city where the client lives, click the button for expanding the
created list and select the desired value from it. This value will be entered in the field. cCity tables (Fig. 6.29).

Ðèñ. 6.29. Selecting the name of the city from the list

USING THE OPPORTUNITY


For creating a list
To place in the form of a drop-down list, it is convenient to use the drop-down list builder. Consider using it to create
an object of type
ComboBox ( Drop-down list) and its properties settings:

1. Press button Combo Box ( Drop-down list) on the toolbar


Form Controls ( Form controls).

2. Click in the place of the form where you want to position the field.

3. To start the builder, right-click and select the command


Builder ( Builder) context menu. A dialog box opens Combo Box Builder ( Drop-down list builder) (Figure 6.30)
containing tabs List Items ( List of objects) Style ( Style), Layout ( Location) and

Value ( Value) in which you can set the format, style and data source for the input field.
Online Tools 149

Ðèñ. 6.30. On List items Optional Accessory Combobox

WITH OVET

To run the object builder ComboBox ( Drop-down list), you can first click the Builder Lock button on the Form Controls toolbar,
and then click the Combo Box button. In this case, when placing the object in the form, the builder immediately starts.

Consider the purpose of the dialog box tabs Combo Box Builder ( Drop-down builder). Tab List Items ( List of objects)
allows you to specify the type of data source to populate the list. It has a drop-down list Fill the list with ( Filling the list)
containing the values ​described in table. 6.16.

Section 6.16. Exploring a List of Fill the list with

Îïöèÿ Remarks

Fields from a table or view (Field for use) It is only possible to obtain additional and complete landings for the use of
additional

Data entered by hand (Listing Dispensing, for quick and easy retrieval of the price list
by List)

Values ​from an array (Values It is true that only remote learning is possible.
​from an array)

When choosing a value Data entered by hand ( The values ​from the list) must be entered in the table a list of
possible field values.

If you select other values ​from the list Fill the list with ( Fill List) tab
List Items ( The list of objects) is changing. In fig. 6.31 presents this tab, which
150 Chapter 6

where the data source is a table field. When using the value Fields from a table or view ( Fields of a table or view) must
first be in the list Databases and tables ( Databases and tables) select a table whose field will be the data source, and
then transfer the desired field from the list

Available fields ( Available fields) to list Selected fields ( Selected fields).

Ðèñ. 6.31. On List items Custom Listing List


If you need to install it Fields from a table or view

In the case when the array is a data source, on the tab List Items ( List of objects) you need to specify the name of the
array and, if it is not used all, enter the number of rows and columns in the list to be placed. After completing the
settings on the tab List Items ( List of objects), to set the display style go to the tab Style ( Object Builder Style

ComboBox ( Drop-down list) (Fig. 6.32). It contains three groups of options. Options Three-dimensional ( Volumetric)
and Plain ( Flat) allow you to set the volumetric or flat style of the field display, determined by the value of the property

SpecialEffect ( Special effect). The options of the second group have the

following purpose:

❒ Drop-down combo - indicates that the created object will be a drop-down list from which the user can select a value
or enter it in the list entry field;

❒ Drop-down list - indicates that the object will be a drop-down list from which you can only select values. Options of
the third group set the value of the property Incrementalsearch and have the following purpose:

❒ Yes, enable incremental searching ( Yes, a value search is possible) - indicates that
when you enter each letter in the entry field of the list, a search for a suitable value will be performed;
Online Tools 151

❒ No, don't enable incremental searching ( No, it is not possible to search for a value) -
It means that when each letter is entered in the list entry field, the search for a suitable value will not be
performed.

Ðèñ. 6.32. On Style Custom Listing List

Ðèñ. 6.33. On Layout Custom Listing List

By setting the necessary options on the tab Style ( Style), go to the tab Layout
(Location) (Fig. 6.33). Check box Adjust the width of the combo box to display all columns ( Increase the width of the
drop-down list to display all columns) sets the value of the property Width ( Width) of the object ComboBox ( Pop-up
152 Chapter 6

list). When checked the width of the drop-down list is increased to fit the values ​of all elements of the list.

The table of this tab contains real data and allows you to set property values ColumnWidths ( Column Width). To
change the width of the column, position the cursor on the right border of the column and move it in one direction or
another.

Tab Value ( The value) of the builder (Fig. 6.34) is intended to indicate the data source and sets the value of the
property ControlSource ( Data source) of the object.

Ðèñ. 6.34. On Value Custom Listing List

After completing the settings, click Ok to close the builder window. In case you need his help again, select the
created object of type ComboBox ( Drop-down list), right-click and select the command from the context menu Builder
( Builder).

Shows
To place a field on the form for entering numerical values ​that change in a given range, you can use an object of the
type Spinner, called counter.

We will place the counter in the form by following these steps:

1. Press button Spinner ( Counter) on the toolbar Form controls


(Form controls).

2. Click in the place of the form where you want to place the counter field.

3. Open the window Properties ( Properties) for an object placed in the form.

4. Property value input field ControlSource ( Data Source) click


expand the list and select the table field for which the counter is created.
Online Tools 153

5. Using object properties SpinnerHighValue ( The highest value of the counter


ka) and SpinnerLowValue ( The lowest value of the counter), set the maximum and minimum values ​that can be
set using the buttons for changing the field value.

6. Using properties KeyboardHighValue ( Maximum value entered


from the keyboard) and KeyboardLowValue ( Minimum value entered from the keyboard), specify the maximum
and minimum values ​entered into the field using the keyboard.

3 NOTE
When you enter a number in the field that goes beyond those set using the properties
KeyboardHighValue and KeyboardLowValue boundaries, a message will be displayed on the screen regarding the
permissible limits of the input number.

7. Using property Increment ( Step), specify the step with which to change-
field value.

8. Create a text box for the field.

9. Save the form with the counter placed in it and run it on


nie.

10. Try entering information using the counter, using


buttons , fields, keys < ↑> and < ↓>, as well as numbers on the keyboard.

Ðèñ. 6.35. Summary, Subject to change


154 Chapter 6

In fig. 6.35 a form is presented containing a counter for entering the discount value that can be provided to the client
if he is a regular customer. When you enter a value greater than the permissible value in the field, Visual FoxPro
displays a warning message indicating the range of the input value.

Preferences and Contents

Visual FoxPro allows you to place lines, rectangles, rounded rectangles, circles, ellipses in a form, used to combine
objects of similar meaning in a group and improve the appearance of the form.

Ëèíèÿ
To add a vertical or horizontal line to the form, follow these steps:

1. Press button Line ( Line) on the toolbar Form Controls ( Elemen-

you control the form).

2. Place the mouse pointer where the line should begin, and, not
When starting the mouse button, move it until the line of the desired length is obtained.

3. Using property BorderWidth ( Line Thickness), enter the number that will be
Det to determine the thickness of the line.

4. If the line is vertical, use the property to set its length Height
(Height). To set the length of the horizontal line, use the property
Width ( Width).

5. To set the color of the line, use the property BorderColor ( Line color).

6. Using property BorderStyle ( Line Style) indicate the line style used
learning the values ​described in table. 6.17.

Section 6.17. Description of the building line in


relation to the property BorderStyle

Note Style Lines

0 - Transparent The site is completely non-existent (the background is empty)

1 - Solid (Default) Short line (by default)

2 - Dash Lines

3 - Dot Business Lines

4 - Dash-Dot Step-by-step

5 - Dash-Dot-Dot Step-by-step features

6 - Inside Solid Leasing


Online Tools 155

Êîntoðû
To add a contour to a form and set its properties:

1. Press button Shape ( Circuit) on the toolbar Form controls


(Form controls).

2. Place the mouse pointer where the object should begin and move
position the mouse pointer until you get a square or rectangle of the desired size.

3. To give the created object a shape other than a rectangle or


square, use the property Curvature ( Bend), which can take integer values ​in the range from 1 to 99.

4. Using property BackStyle ( Background Style), specify whether the created


The project is transparent.

5. Using property FillStyle ( Fill Style) Define Fill Pattern


(tab. 6.18).

Section 6.18. Description of the terms of the operation in terms of the ownership of the property Fillstyle

Note Procurement

0 - Solid Special Offer

1 - Transparent (Default) Refill (by revision)

2 - Horizontal Line Extension Shocking

3 - Vertical Line Automatic short-circuiting

4 - Upward Diagonal Punching on the left to right

5 - Downward Diagonal Spare parts for spare parts on the left

6 - Cross Expansion and closing

7 - Diagonal Cross Accessories for accessories in the factory

6. Using property FillColor ( Fill color) set the color of the fill pattern
object.

7. Property BorderStyle ( Frame Style) is used to set the frame style.


object. It contains the same values ​as for the line.

8. To give volume contour, use the property SpecialEffect ( Spe-


social effects).
156 Chapter 66
Chapter 7

Creating and receiving feedback

In the previous two chapters, you saw Visual FoxPro tools for creating forms. No less powerful tools are available to
the developer to create reports.

After reading this chapter, you will learn what a report is and get acquainted with the tools for creating and printing
reports in Visual FoxPro.

Quick Start
A report is a formatted representation of data displayed on a screen, printer, or file. The report created in Visual
FoxPro can be presented in tabular form or in free form.

A table report is a printed table in which a row is a record, and each of the elements in a row contains a field in the
source table or a calculated field. The data in the table is ordered. Tabular reports are used to print data presented in
a list.

When preparing letters and mailing labels, the fields of the tables used in the report should be located in specially
designated places. In this case, the tabular report is not suitable, and free-form reports are used. When creating such
a report, you can use the standard format automatically created by Visual FoxPro for each table in which the fields of
the source table are arranged vertically. Using the report designer, you can develop your own report formats, where
the fields of the source table will be located where you need.

Recommendations for creating a report


If you need to create a simple table report that uses fields from one table, then you will most likely not have
difficulties. Before you start creating a more complex report, you should have a clear idea of ​what you want to get as
a result. Therefore, consider the questions below.

❒ What is the purpose of this report?

❒ What type of report do you create (tabular, free-form or stickers)?


158 Chapter 7

❒ From which tables should the information be presented in the report?

❒ Which of the tables used in the report will be the main, and which will be subordinate?

❒ By what parameters will the information in the report be ordered?

❒ Will data grouping be used when creating the report and by what
parameters?

Having received clear answers to the questions posed, you will facilitate your work when creating a report.

When creating the first reports, before you start working with the report designer, draw a report format on paper. This
will save you from mistakes and reduce the time spent on the development of the report.

When creating complex reports using data from several tables with a one-to-many relationship, it is advisable to go in
sequential steps from simple to complex. First, add the main table to the environment and place its fields in the
report. After that, view the report in the preview window and make sure that it is formed correctly. Then add a second
table to the environment, associate it with the main one, set the type of relationship used between the tables, and
place its fields in the report. And again, make sure that the report prints the data that you want to receive. With this
approach to creating a report, it will be much easier for you to understand the errors that appear or to avoid them
altogether.

Designing a report
In Visual FoxPro, you can use the following tools to create reports.

❒ Report Wizard. Allows you to quickly create a report,


changing the sorting, grouping of data and the style you set. To create a ready-made report using the wizard, it is
enough to answer a number of questions from the Report Fox Wizard.

❒ Report Designer. In the report designer, you can


Run your own reports or modify reports that were created using the wizard.

❒ Quick Report. This product is intended for placement


in the designer of the report of fields and the task of the environment. The developer is offered two options for
placing fields.

When creating a report, you can use any tools offered by Visual FoxPro that you find more convenient. Of course,
more features are provided by the report designer, which allows you to create reports both in tabular form and in free
form. The next chapter will be devoted to developing reports using designer tools.

Use of the installation


For the creation of a new product
To create a report using the wizard, you need to run it, and then select the tables included in the report in the opening
dialog boxes, define a list of report fields and the order of their placement, indicate the type of data ordering.
Creating and receiving feedback 159

To start the report wizard, do one of the following:

❒ select the Wizards command from the Tools menu, and then open
go to menu value Report;

❒ click the Report Wizard button in the New Report dialog box
(New report), which opens when creating a new report from the project window;

❒ click the Wizard button in the New dialog box that opens
It appears when you click the New button on the standard toolbar or when you select the New command from
the File menu and set the Report option.

Consider creating a single table report using the wizard:

1. Open the project you are creating, for example, Sales

2. Open the project database. To do this, on the Data tab, position the cursor on its name and click the Open button
on the project window. In this case, on the standard toolbar in the Databases list, the name of the open database
will appear.

3. Go to the Documents tab and select the Reports group.

4. Click the New button on the project window (Fig. 7.1).

5. In the New Report dialog box that opens (Fig. 7.2), select the Report Wizard option.

Ðèñ. 7.1. Reports panel in the main window of the project


160 Chapter 7

Ðèñ. 7.2. Long Report New Report

6. After starting the wizard to build a report, a dialog box opens (Fig. 7.3), in which you must specify the type of
report to be created (Table 7.1).

Section 7.1. Conclusion

Conclusion Recording

One-to-Many Report Wizard. Creates a response for the complete "Modified Commerce"

Report Wizard (Custom Report Wizard) Provides a quick and easy response

To create a simple single-table report, select the Report Wizard value and click OK.

Ðèñ. 7.3. Extended window for choosing type of result

7. The first wizard dialog box opens (Fig. 7.4), in which you must specify the table for which you are creating a report
and select the fields to be placed in the report. There are two lists in the Databases and tables area. The top list
contains open databases, and the bottom contains tables
Creating and receiving feedback 161

selected from the top list of the base. Select the required database from the top list and the table for which
you are creating a report from the bottom.

Ðèñ. 7.4. Shortcut for modular design with optional

3 NOTE
It may turn out that in the wizard's dialog box, the lists in the Databases and tables area are empty or do not contain the data
that you intend to use to build the report. This situation occurs if you have not previously opened the necessary database.
Nothing wrong. To select a database and its tables, click the button located next to the list of databases. The Open dialog box
opens, allowing you to find the table that will be used in the report.

8. After selecting the table for which the report is generated, the Available fields list will contain a list of all the fields in
the table. You need to transfer from the list to the Selected fields list the fields that you want to place in the
generated report. To transfer fields, use the buttons located between the lists or double-click on the list item. After
forming the list of fields displayed in the report, click Next to proceed to the next step in creating the report.

9. In the next dialog box of the report creation wizard, you must specify the fields by which the data will be grouped in
the report (Fig. 7.5). In the center of the dialog box are three drop-down lists that allow you to specify up to three
groups of data in the report. These lists contain all the fields in the table. To group data in a report, select the
required field from the drop-down list 1. When creating the second and third groups, lists 2 and 3 are used,
respectively.
162 Chapter 7

Ðèñ. 7.5. Additional field for the maintenance of other products

Ðèñ. 7.6. Long Distance Grouping Intervals

10. To set the grouping interval, click the Grouping options button. The Grouping Intervals dialog box opens (Figure
7.6). The Grouping intervals drop-down list of this window contains the values ​described in Table. 7.2.

Section 7.2. Recordings of customization


Listing Grouping intervals

Customization Recording

Entire Field Customization for independent use of the full range of applications

1st Letter (1 letter) Accessories for easy access to the front of the box.

2, 3, 4, 5 Initial Letters (2, 3, 4, 5 Operational support for 2, 3, 4, and 5 if necessary.


new days)

Set the desired value and press the OK button.


Creating and receiving feedback 163

11. To generate summary values ​in the report, use the Summary Options dialog box (Figure 7.7), which opens when
you click the Summary Options button. It contains a table, the rows of which are the fields of the table, and the
columns indicate the possible total values ​of the report (Table 7.3).

Section 7.3. Finishing a report

Stolol Remarks

Field Using the field for quick operation requires a quick, complete view of the output.

Sum Ïð And installing the file in the second place will replace the second one in the field.

Avg And if you install the game, you will need to change the result to the same way as the field.

Count Ïð And installing the plug-in switch to replace the final plug-in switch

Min And if you install the product, you will need to change the use of the field for it.

Max And if you install the file, you will need to change the size of the field.

Check the boxes for the totals you want to display in the report.

Ðèñ. 7.7. Summary Window Options

In the Summary Options dialog box, under the table, there is a switch that controls the display of data areas in
the report (Table 7.4).

Section 7.4. Exploring the Options window The Summary Options

Îïöèÿ Remarks

Detail and Summary (Custom and Ïðè óñòàíîâêå ýòîé îïöèè â îò ÷ åòå îòîáðàæàåòñÿ îáëàñòü äàííûõ, ïðîìåæóòî ÷ íûå
Final) èòîãîâûå çíà ÷ åíèÿ ïî ãðóïïèðîâêàì è êîíå ÷ íûå èòîãîâûå çíà ÷ åíèÿ ïî îò ÷ åòó
164 Chapter 7

Section 7.4 (General)

Îïöèÿ Remarks

Summary only (Summary) If you need additional support in this way, you will have to pay more attention to the
result.

No totals (Totals) If you want to get help, please contact us for more information.

In the lower right corner of the Summary Options dialog box, the Calculate percent of total for sums check box
is located, which allows you to print the percentage of the intermediate total total value from the final total total
value for the report as the total value.

After completing all the necessary settings in the Summary Options dialog box, click OK.

12. In the next wizard dialog box, the style for displaying objects in the report is set (Fig. 7.8).

Ðèñ. 7.8. Selecting an Access Point for a Result

The Style list contains several options for displaying objects (fields, lines, headers, etc.) in the report. When
choosing a style, the wizard allows you to see how the report elements will look. To do this, use the viewing
area in the upper left corner of the dialog box. After selecting a style, click Next to proceed to the next step.
Creating and receiving feedback 165

13. At the fourth step of creating the report, you must specify the order of placement of objects in the report (Fig. 7.9)
and the orientation of the report page. After you have installed the required options, click the Next button.

Ðèñ. 7.9. Installing Options for Changing Options in Result

Ðèñ. 7.10. Installing the cassette


166 Chapter 7

14. At the fifth step of creating a report, using the wizard, you set the fields by which you want to organize the data in the
report (Fig. 7.10). To create a list of fields to be sorted from the Available fields or index tag list (containing all
report fields and table indices), transfer the required fields to the Selected fields list in the order in which data will
be ordered. To transfer fields, use the Add button or double-click on the field name.

Using the Ascending (Descending) and Descending (Descending) options, specify the sorting mode for the
selected field: ascending or descending, respectively.

Having formed the list of fields and specifying the type of sorting, click the Next button to proceed to the
next step.

15. In the sixth step, you can specify the title of the report using the Type a title for your report input field (enter the name
of the report title). In the same dialog box, you can specify one of three options for further work with the report (Fig.
7.11) (Table 7.5).

Section 7.5. Options for the Report Wizard - Step 6

Îïöèÿ Action

Save report for later use (Save Report) Comprehensive feedback on the environment

Save report and modify it in the Report Designer Comprehensive feedback on the descriptive and quick response in
(Comprehensive and Integrated Modular Design) the quick response for the modulation

Save and print report (Save and print report) Comprehensive feedback on the descriptive and optional

The form has two flags. The Use display settings stored in the database check box indicates whether to use the
field properties specified in the database designer when creating the report. The Wrap fields that do not fit
checkbox indicates whether to place non-moving information on multiple lines.

In the lower right corner of the dialog box is the Preview button, which allows you to view the generated report.
If the created report does not meet your requirements, using the Back button you can return to the previous
steps of building the report and change the parameters set there.

After entering the title and setting the required option, to finish creating the report using the wizard, click the
Finish button. The Save As dialog box opens, in which enter the name of the created file. In fig. 7.12 presents a
report created using the wizard. If it completely suits you, you can print it. But, most likely, you will want to change
something in it. In this case, open the created report in the report designer and modify it.
Creating and receiving feedback 167

Ðèñ. 7.11. The final step of creating a result

Ðèñ. 7.12. Note: Creating and supporting the installation


168 Chapter 7

3 NOTE
When you create a report using the wizard, the labels for the report fields are created based on the information entered in the
Caption field of the Table Designer table designer. If this field is empty, the labels match the table field names.

Provision of a Progress Report


If you want to see how your report looks, it’s not necessary to print it. Just open it in the preview window using any of
the following Visual FoxPro tools:

❒ Print Preview command from the File menu;

❒ Preview command from the View menu;

❒ Preview command of the context menu;

❒ Print Preview button on the standard toolbar


Visual FoxPro

❒ Preview button of the project window.

Property Management,
Utility for optional feedback
When you open the report in the preview window, the Print Preview toolbar appears on the screen (Fig. 7.13), which
allows you to move between the pages of the report and print it. The buttons for this toolbar are shown in the table.
7.6.

Ðèñ. 7.13. Property Management, Utilities


A quick response to the test

Section 7.6. Toolbar Print Preview

Button Remarks

turn off

Turns on the power switch.

Turn on the long-range window Go to Page

Turns on the right side of the page

Turns on the last turn on the turn Turns off on the


Creating and receiving feedback 169

Section 7.6 (General)

Button Remarks

Changing the quick response to the test

Close the window to receive feedback

Responses to

Responses
You have prepared the report, viewed it in the preview window and made sure that it looks the way you want. Now
you can print the report on the printer using one of the following methods:

❒ select the Print command from the File menu;

❒ select the Run Report command from the Report menu;

❒ select the Print command of the context menu;

❒ click the Print One Copy or Run button on


Visual FoxPro standard toolbar

❒ press the key combination <Ctrl> + <P>.

The Print dialog box opens (Fig. 7.14), allowing you to specify the printer used for printing, change, if necessary, its
settings and set print options.

At the top of the Print dialog box is an area that allows you to select a printer. The options for the Page Range area
allow you to specify which pages to print and have the following purpose:

❒ All - all pages of the report are printed;

❒ Selection - Selected pages are printed;

❒ Pages - pages whose numbers are set in


right entry field.

The Number of copies counter allows you to specify the number of printed copies of the report.

If you need additional settings for the printer, click the Options button. As a result, the Print Options dialog box opens
(Fig. 7.15).

The Type field of the Print what area allows you to specify the type of information to print. The File field contains the
name and location of the print file.

In the Options area, there are flags, the purpose of which is described in Table. 7.7.
170 Chapter 7

Ðèñ. 7.14. Long-distance window

Ðèñ. 7.15. The Long Window Print Options


Creating and receiving feedback 171

Section 7.7. Selecting the Options Window Print Options

End Remarks

Line numbers (Line numbers) Turn on the left to turn off the power switch. Long-lasting user-friendly operation with
the help of a short-lived Windows keypad and a new Windows

Page eject before (To do this, go Selecting a front panel for a new start up front
to step by step)

Page eject after (Post-release post-test) Receiving a front-end drive in front of a new interior after retrieving the input

Restore environment (Restore the User-friendly features for FoxPro compatibility 2.x version 2.x
environment)

When you click the Options button in the Print Options dialog box, the Report and Label Print Options dialog box opens
(Figure 7.16).

Ðèñ. 7.16. Report and Label Print Options


Make sure you clean the record for recording.

In the Report and Label Print Options dialog box, you can specify criteria for selecting the records printed in the report
(Table 7.8).

Section 7.8. Recordings for recording

Êðèòåðèé Remarks

Scope (Recordings) Compiles the Scope list (Quick Recordings), in addition to the Scope List,

For (Sub) If you have a quick start, you can create a new one if you need to.

While (Prerequisites) It allows for quick start-up, which allows you to create a quick shutter for a quick drive. If you
want to, For example, if you want to change the value of the value for
172 Chapter 7

Ðèñ. 7.17. Turning on the remote window switch

To configure additional report printing options, you can use the Location tab of the Print dialog box (Fig. 7.17). The
Orientation area allows you to specify the location of the paper (portrait or landscape), and the Page Order area
allows you to specify the page printing order. In order to change the size of paper used for printing, print quality, use
the Advanced Features dialog box that opens when you click the Advanced button.

On the Paper / Quality tab of the Print dialog box, you can specify how paper is fed into the printer.
Creating and receiving feedback 173

Chapter 8

Create a report
With the help of the effective report

In the previous chapter, we looked at creating a report using the wizard. In the process of using the report, it is almost
always necessary to modify it. Creating reports using the wizard fails. And in these cases, you can not do without a
report designer.

Close-up report
There are several different options for opening a report designer window. If you want to modify a previously created
report, in the project window, position the cursor on its name and click Modify ( Modification).

To open the report designer window when creating a new report, do one of the following:

❒ on the menu File ( File) select command New ( New). In the dialog that opens
the window New ( New) select an option Report ( Report) and click New file
(New file);

❒ press the button New ( New) in the project window, after selecting a group
Reports ( Reports), and in the dialog box that opens New Report ( New report) click New Report ( New report);

❒ press the button New ( New) on the standard toolbar; in open


dialog box New ( New) set option Report ( Report) and click New file ( New file).

To work in the report designer, toolbars are used Report Designer ( Report Designer) and Report Controls ( Report
Controls) as well as item commands Report ( Report) (Fig. 8.1) of the main menu that appears on the line when the
designer opens.

In the table. 8.1 provides a brief description of the toolbar buttons Report Controls ( Report Controls). The purpose of
the buttons for this panel will be discussed in more detail in the sections on the placement of various controls in
reports.
174 Chapter 8

Ðèñ. 8.1. Short-range test report

Section 8.1. Report Controls Panel Buttons

Button Set Remarks

User manual for selecting a response

Label TEXT TEST

Field (Lol) SIZES A FIELD

Line (Ëèíèÿ) Take a line

Rectangle (Note) Take a look at the options

Rounded Rectangle (Utility) Take a look at the accessories of the camera

Picture / OLE Bound Control (Detail / OLE Submitting to Image


Bound Control)

Button Lock Selects the Object Selector


Creating a report with the help of a quick report 175

Connecting bandwidth to projective range


The entire workspace of the report designer is, by default, divided into three strips limited by dividing lines (see Fig.
8.1). The name of the strip is displayed on the dividing line immediately below the strip. When data grouping is used in
a report, adding a cover page and summary data to it, additional bands appear. Each bar can contain report controls,
such as text, tabular and calculated fields, lines, rectangles, and drawings.

The types of bands possible in the report are given in table. 8.2. The main purpose of the strip is to determine when
and where objects placed in the strip will be printed.

Section 8.2. Bandwidth Ratings

Colossus Remarks

Title In this case, you will need to change the information in order to ensure that you receive the
(Summary) necessary information. This means that you receive a quick response, and you receive a
quick response to it.

Page Header This band is in the same position as the upper control panel. Further, alternating in the strip,
(Home team) before switching in the other way. Note that you can improve the quality of the test, the
current test, and the short circuit. ä.

Group Header (óïïà In full, with the help of information, with the help of the program. If you have other options,
sâåðõó) you can use the same bandwidth as you need to do so. Please note that you need to
integrate information with the product in a separate way.

Detail This means that you can add more space to it if you want to use it.
(Details)

Group Footer In the case of a wide range of retail entertainment


(Home)

Page footer In case of a negative contact, the result is a positive result, but it is not necessary.
(The last collector)

Summary In case of a result, an infor-


(Return)

Using the command Quick report


FOR FIELD CHANGE
In the process of creating a report, all or part of the following procedures are performed.

❒ Environment Definition

❒ Placement of objects in the report: text, fields, lines, rectangles and drawings

❒ Grouping data in a report

❒ Saving Report
176 Chapter 8

❒ View generated report in preview window

❒ Print Report

You can speed up the placement of data in a report using the command Quick report
(Quick report) from the menu Report ( Report). A report resulting from this command is called a quick or standard
report. In other words,
Quick Report ( Quick Report) is a report designer tool that automatically places selected fields and labels in the report
designer window. After that, you can modify the received report by changing the text of labels, the order of the fields,
add data grouping, heading to the report, etc.

To create a report using the command Quick Report ( Quick report), you must perform the following steps:

1. Open the project database. To do this, on the tab Data ( Data) install
cursor on its name and click Open ( Open) project windows. In this case, on the standard toolbar in the list Database
( Databases) the name of the open database will appear.

2. Open the report designer window in any way convenient for you.

3. In the report designer window, select Report ( Report) team


Quick Report ( Quick report).

4. In the dialog box that opens Open ( Open) contains a list of all tables
open database in the project (Fig. 8.2). Select the table for which a standard report is generated and click OK

Ðèñ. 8.2. Long Window Open

3 NOTE
If you do not open the database before creating the report, the Open dialog box will appear on the screen, which differs from
that shown in Fig. 8.2. It will not contain a list of database tables, but a window that opens in Visual FoxPro to search for the
required file on disk.

5. After selecting a table, a dialog box opens. Quick Report ( Fast


report) (Fig. 8.3), which offers options for the location of fields in the report
Creating a report with the help of a quick report 177

those in a column or row (two buttons). Choose one of the proposed options:

• when you press the left button, the fields will be placed in the strip Detail ( Details) from left to right
throughout the page;

• if you press the right button, the fields will be placed in the strip Detail ( Details) under each other.

Dialog window Quick Report ( Quick report) contains flags, the description of which is given in table. 8.3.

Section 8.3. Shortcut to the Quick Report

End Remarks

Titles (Title) Ïð And setting the file to the next floor and writing

Add alias (Add Details) The option is to be used in order to improve the quality of the
environment.

Add table to data environment. If you want to use the product in the same way, please use the
following instructions.

Ðèñ. 8.3. Long Window Quick Report

6. If you want to place all fields of the source table in the report, then this step
skip and immediately press the button Ok to close the dialog box Quick Report ( Quick report). To select the fields
displayed in the report, click Fields ( Fields). A dialog box opens Field Picker ( Field selection) (Fig. 8.4). Select the
fields that you want to place in the report using the button Move ( Move). If you need to put all fields in the report,
use the button All ( All).

WITH OVET

If you need to place all but a few fields in a report, first select all the fields, and then remove the extra ones using the
Remove button.
178 Chapter 8

Ðèñ. 8.4. Long Range Field Picker

7. After completing the selection of fields, click Ok to close the dialog box Field
Picker. Press also the button Ok in the window Quick Report ( Quick report). Now the report contains all the
necessary fields. Also in the strip Page Footer ( Footer) is a field with a function DATE () and the field with the
system variable _ PAGENO, indicating the date and current page number of the report, respectively.

A fragment of a report generated using the command Quick Report ( A quick report) is presented in Fig. 8.5.

Ðèñ. 8.5. Quick Report Created with Quick Report Tools


Creating a report with the help of a quick report 179

If the text and field names in the report do not display correctly, you must change the font of these objects. To do
this, follow these steps:

1. Select all report objects using the command Select All ( Select
all) from the menu Edit ( Edit).

2. Open the dialog box Font ( fig. 8.6). To do this, in the menu Format ( Format)
select team Font ( Font).

Ðèñ. 8.6. Long distance window

3. Using a list Font dialog box Font, set necessary


font.

4. Set the style, style, color, and size of the characters of the selected objects.

5. After completing the settings, click Ok to close the dialog


window.

6. Click anywhere in the report outside the selection.

Installing the middle of the report


For a report created by a wizard or using a command Quick Report ( Quick report), the environment of the report
environment is already defined. The developer creating the report using the report designer needs to create the
environment by completing the following steps:

❒ place in the environment the tables used in the report;

❒ set the necessary indexes for tables;

❒ establish relationships between tables.


180 Chapter 8

All information related to the environment is stored in the report description file.

To create a report environment, use the window Data environment


(Environment) (Fig. 8.7), to open which you can use one of the following methods:

❒ on the menu View ( View) select command Data Environment ( Environment);

❒ select item Data Environment ( Environment) context menu.

In the environment you need to place all the tables used in the report. To add a table to the environment, use the
command Add context menu or command Add ( Add) from the menu DataEnvironment ( Environment). Linked
database tables are migrated to Data Environment ( Environment) while maintaining the relationships established
between them.

As with forms, you can use the cursor adapter to create reports. For this, two commands are located in the context
menu. Add CursorAdapter ( Add cursor adapter) adds a cursor adapter to the report environment. Team

Builder ( Builder) launches a builder that configures the cursor adapter.

Ðèñ. 8.7. Long Distance Data Environment

After placing the tables in the environment of the report, you need to organize the data in the tables. To do this,
follow these steps:

1. Select the table in which you want to organize the data.


Creating a report with the help of a quick report 181

2. Open the table properties window. To do this, position the cursor on it, click
right mouse button and select the command in the popup menu
Properties ( Properties).

3. Highlight Property Order ( Order) (Fig. 8.8).

Ðèñ. 8.8. Satisfied Order Useful recordings for recording

4. In the property change field, click the list expansion button. From the list of
table dexes, select the one by which you want to arrange the data in the report. If the report uses several related
tables, you need to make sure that the relationships are established as required to create the correct report. To do
this, follow these steps:

1. Select the line joining the tables. In this case, in the properties window Properties
(Properties) the properties characterizing the relationship established between the tables will be displayed.

2. Check which of the tables is parent and which one is relative


niyu to her. To do this, view the properties ChildAlias ​( Child table) and
ParentAlias ​( Parent table).

3. See the expression by which the tables are related. To do this, use
property RelationalExpr ( Expression of relationship).
182 Chapter 8

After placing in the window Data Environment ( Environment) of all tables used in the report, close it, after that Visual
FoxPro will save the environment you created.

Accessory Instrument
Any report consists of objects: text, report fields, dividing lines and frames, graphic images. To configure their
properties, use menu commands, as well as a dialog box that can be opened in one of the following ways:

❒ double click on the object;

❒ select the command from the context menu of the object Properties ( Properties).

The properties window contains several tabs, the number of which is different for different objects. Consider the tab
options available in the properties window of all report objects, using the example of the text object settings dialog box La
Properties ( Label properties) (Fig. 8.9).

Ðèñ. 8.9. Long Window Label Properties

On General
Tab General ( General) The property window is used to configure general object parameters.

The location of the object in the report strip is set by the switch Object position ( The position of the object), which
contains the options listed in the table. 8.4.
Creating a report with the help of a quick report 183

Section 8.4. Options for Object position

Îïöèÿ Remarks

Float Use the option to change the scope of the procedure to change
(Previous) the option.

Fix relative to top of band. Find a good way to get the most out of the world.

Fix relative to bottom of band (Long Find a good way to get a good finish for a lower ground area
Range)

Region Size and position in layout ( Size and position in the template) contains fields that determine the location of
the object relative to the report page. Their purpose is described in table. 8.5.

Section 8.5. Area of ​Size and position in layout

More Remarks

From page top Sorting out the installation;


(À ã ã û û û))

From left Saving from the left side of the page for more information
(Left side of the page)

Height Accessibility
(Height)

Width Property Dimension


(Øèðèíà)

On Style
Tab Style ( Style) of the properties dialog box (Fig. 8.10) is used to configure the design of the object.

For text report objects (inscription, field) on the tab Style ( Style) located area Font ( Font) designed to customize the
font. A description of the flags of this area is given in table. 8.6.

Section 8.6. Neighborhood Font

End Remarks

Use font script Use the same method as the remote controller and the remote control
(Use a simulator) in addition to the

Strikethrough (Çà ÷ Direct access to the secondary line


åðêíóòûé)

Underline Helpful Hearing


(Business)
184 Chapter 8

Ðèñ. 8.10. Style Keyboard Label Properties

Region Color ( Color) contains the flags shown in the table. 8.7.

Section 8.7. Color Area

End Remarks

Use default foreground (pen) color (Use this to It means that you can use it for the text, and you need to fix it in the
change the text for editing) end.

Use default background (fill) color (Use for a This means that you can use it for the background;
custom background for editing)

Switch BackStyle ( Background style) determines the transparency of the background of the object: Opaque ( Opaque)
or Transparent ( Transparent).

On Print when
To set the printing conditions for report objects, use the tab Print when ( Printing condition) (Fig. 8.11) of the properties
window. Using the parameters of this tab, you can remove empty lines from the report, determine the conditions for
printing field values ​when moving to the next page or when changing a group expression, etc.
Creating a report with the help of a quick report 185

Ðèñ. 8.11. Print when Label Properties window

To suppress the printing of duplicate object values, use the value No


(No) switch Print repeated values ​( Print duplicate values). When set Yes ( Yes) all object values ​are printed.

Region Also print ( Print) contains flags, the description of which is given in table. 8.8.

Section 8.8. Neighborhood Also print

End Remarks

In first whole band of new page / column (New Full Quick start in new front panel for colo
Strip / Column)

When this data group expression changes (To change the Making changes for changing the operation of the game, a
scope of the operation) selection of the list

When band content to new page / column (Ïð ð í ð ð ð ð Part on the front with a detailed strip on the new storing
ð))))))))))) side of the col

When checked Remove line if blank ( Delete blank lines) blank lines are removed from the report.

In field Print only when expression is true ( Print, if true), using the expression builder, you can specify the expression
to evaluate before printing this object. If the value of the expression is false, then the value of the object will not be
printed.
186 Chapter 8

On Protection
Tab Protection ( Protection) (Fig. 8.12) establishes protection against changing report objects using the report
designer. It contains flags, the description of which is given in table. 8.9.

Section 8.9. Settings for Protection

End Remarks

Object cannot be moved or resized Change and change the size of the switch
(Please note that it is not necessary to change or replace it.)

Object cannot be edited Attachment Modify


(Please do not accept any changes)

Object cannot be deleted (Make sure you Supplementing the unit


have deleted it)

Object cannot be selected (Îú Please note that you will be able to change it.

Object is not visible in Designer (Quick Tool Find out what is in effect
in Designer)

Ðèñ. 8.12. Protection Button Label Properties

3 NOTE
In order for the protection properties to take effect, you must open the report with the key
Protection For instance, MODIFY REPORT MyReport PROTECTED.
Creating a report with the help of a quick report 187

On Other
Tab Other ( Other) (Fig. 8.13) of the report object properties dialog box contains additional features for report
objects.

Ðèñ. 8.13. Other Options Label Properties

The tab contains buttons, the purpose of which is described in table. 8.10.

Section 8.10. Other Buttons

Button Remarks

Edit comment Turns on the rear window in the case of the rear view.
(Editing Commands)

Edit user data (Editing Turns on a separate window, in addition to a quick turn-over, and also turns on a
turn-key switch.
User Options)

Edit tooltip Turns on the long-term shut-down window for quick start-up;
(Editing the best steps)

Edit settings Optional settings, which can be improved by using the latest version of the
(Editing settings) program in conjunction with the
188 Chapter 8

Changing Objects to Result


We examined the general parameters used to configure the properties of objects. In this section, we examine the
placement of various objects in the report and the setting of their parameters.

Direct Infomation
The text placed in the report is an object that can be selected, moved, saved in the temporary Windows buffer,
copied from the buffer, or deleted. To enter or edit text in a report, follow these steps:

1. Press button Label ( Label) on the toolbar Report Controls ( Elemen-


you are management report).

2. Click in the place of the report designer window where you want to place
Type or correct text.
3. Make the necessary additions or changes.

WITH OVET

The text may consist of several lines. To transfer part of the text to a new line, use the <Enter> key.

4. Press button Select Objects ( Object Selection) on the toolbar Report


Controls ( Report Controls).
5. Using the object properties dialog box Label Properties ( Label properties)
configure its parameters.
For the text placed in the report, you can change the font settings and color using the tab Style ( Style) object
properties windows Label Properties ( Label properties) (see. Fig. 8.10) or command Font ( Font) menu Format ( Format)

WITH OVET

The font used in the default report can be set in the Default font field on the Reports tab of the Options dialog box, which opens
when you execute the Options command from the Tools menu.

Field Separation
To place a field in the report, which can be a table field or a calculated field, follow these steps:

1. Press button Field ( Field) on the toolbar Report Controls ( Items


management report).
2. Click at the location of the proposed field in the design window.
Report Ra.

3. A dialog box opens Field Properties ( Field properties) (Fig. 8.14). Is-
Using the tab interface objects, configure the field parameters. The properties window allows you to:

• define a data source or specify an expression whose calculation result will be displayed in this field;
Creating a report with the help of a quick report 189

• set the format for displaying data in the field;

• indicate the print condition;

• set the position of the field in the report.

4. After completing the settings, close the properties window by clicking OK

3 NOTE
You can also use the transfer-and-leave method to place a field in a report. Open the Data Environment window of the report,
position the cursor on the name of the field to be placed, press the mouse button and holding it down, move the cursor to the
place of the proposed location in the report, and then release the mouse button. If the Caption property is set for the field in the
table designer, the field will be placed in the report along with the caption.

Ðèñ. 8.14. Long Range Field Properties

Use the field


To determine the expression, the calculation result of which will be displayed in the field placed in the report, the field
is intended Expression ( Expression) Tabs General
(General) property windows Field Properties ( Field properties) (Fig. 8.14). The expression in this field can be entered
manually or set using the builder, opened by pressing the button located to the right of the field. This opens a dialog
box Expression Builder ( The builder of the expression) (Fig. 8.15), where in the field

Expression ( Expression) You must specify the desired expression.


190 Chapter 8

List Fields ( Fields) dialog box Expression Builder ( Expression Builder) contains fields of tables placed in the report
environment and a list Variables ( Variables) - Visual FoxPro system variables. In the region of Functions ( Functions)
placed string, logical, mathematical functions, as well as date and time functions. Using the values ​from these lists,
create the necessary expression for the created field.

WITH OVET

To form an expression, there is no need to enter information in the Expression field manually. It is enough to select the
required value from any list and click it to transfer it to this field.

When creating calculated fields, create an expression and check its correctness using the button Verify ( Verify). For
example, you can display in the report instead of two fields containing the city and address of the customer, one
calculated field that contains the full address. The expression for this field is as follows:

ALLTRIM (Customer.cCity) + "," + ALLTRIM (Customer.cAddress)

After completing the expression, click Ok to close the dialog box Expression Builder ( Expression builder).

Ðèñ. 8.15. Application of the general field

You might also like