Professional Documents
Culture Documents
❒ 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).
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
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).
Îïöèÿ Îèï ò î î î
Îïöèÿ Îèï ò î î î
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
8. At the next (third) step, a criterion is specified for sorting the data displayed in the form (Fig. 5.6).
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.
Îïöèÿ 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
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:
You can also run the form as a program. To do this, follow these steps:
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.
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:
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:
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).
On Remarks
All (Âñå) Compiles a list of all the features and methods of the method in the manual
Layout
Quick Start Guide and Modification 99
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 (Äîáàâèòü â
Èçáðàííîå)
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
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)
To the left of the property input field are four buttons that are designed to perform the functions described in the
table. 5.5.
Button Remarks
Ðèñ. 5.12. Setting up the property Backcolor With the use of a long-range window Öâåò
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;
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:
2. Click one by one on the objects from which you want to deselect.
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.
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.
Ê 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 Horizontal Centers (Live Automatically selects for a wide range of areas
Center)
Ê Remarks
To fit The option is available for the product as well as the optional option for the optional product.
(Ðððíí))
To tallest Installs a wide range of accessories for a quick and easy access to a variety of products
(On top)
104 Chapter 5
Ê 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 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).
Îïöèÿ Action
Make Equal (Optional) Installing the optional installation options for the optional
The Format menu also contains commands that control the display of an object in a form (Table 5.9).
Ê Action
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
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.
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
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).
❒ 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
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
Select Objects Owner's guide. You can select one of the options
View Classes You can select one of the following for your design.
Grid (Òàáëèöà) Create in the field for the replacement of the field in the front of the
unit
ActiveX Bound Control This is a compatible OLE device, a general field of technology.
(OleBoundControl)
(ActiveX-Bound)
Builder Lock (Accessory Lock) This option allows you to automatically select the option to change the
option.
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.
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.
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))
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.
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.
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
Creating a company
The process of creating a form includes the following steps:
❒ 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;
Let's start creating a form in the form designer by setting its parameters.
114 Chapter 6
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).
Ðèñ. 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.
Note Recording
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.
Note Recording
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:
❒ 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.
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:
❒ 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
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:
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).
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.
The most convenient way to create a cursor adapter is to use the cursor adapter builder by doing the following:
Cursoradapter1.
❒ 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
❒ 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
Now consider the sequence of actions to determine the environment and set the basic properties of the form:
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.
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).
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.
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
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).
On Remarks
Field Selection (Other field), which will require a change in the field (Fig. 6.10)
Ðèñ. 6.10. Option for choosing a field that is suitable for use in the field
with the optional tool
124 Chapter 6
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).
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).
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>.
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).
2. Click in the place of the form where you want to place the input field.
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. To set the style and color of the field border, use the properties BorderStyle
(Frame Style) and BorderColor ( Frame color) respectively.
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.
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).
Êîä Remarks
D FOR EDITING A TYPE OF DATA FOR USING THE FUNCTION OF THE PRODUCT SET DATE ( ð ð ð,
BRITISH, GERMAN è ò. ä.)
L This option allows you to select the next option in the field of water.
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.
Êîä Remarks
# 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
Êîä 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
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.
Y You can only enter y, Y or n, N For a false value of True (Removing) or False (Fulfilling 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).
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 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.
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.
ÏÏÏì 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. 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
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:
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.
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
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
():
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.
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.
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.
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:
GO TOP
Endif
_screen.ActiveForm.Refresh ()
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:
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).
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.
list and from the list of table fields Goods select field gImage ( Image), which is of type General and contains
images of goods.
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).
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.
Satisfied Remarks
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.
3. Click in the place of the form where you want to place the input field
country names.
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
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.
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.
0 - None Using the list of auxiliary functions with the help of methods AddItem ( Additional Information) AddListIt
( For more details)
2 - Alias In case of direct use of advanced applications, please contact us. Fully Enabled Fully Equivalent
Operational Values Columncount
(The field is full)
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).
Satisfied Remarks
Firstelement Will give you a quick fix, will shorten the process in the list
(Real Estate)
Multiselect Injection, if you need to use it, select a more comprehensive view of the list.
(Homepage)
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.
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).
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.
4. Click on the location of the deleted object. Type object ComboBox ( Pop-up
list) will be placed on the form.
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).
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
2. Click in the place of the form where you want to position the field.
Value ( Value) in which you can set the format, style and data source for the input field.
Online Tools 149
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.
Îïöèÿ 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
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.
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.
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.
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.
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.
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.
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:
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.
2 - Dash Lines
4 - Dash-Dot Step-by-step
Êîntoðû
To add a contour to a form and set its properties:
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.
Section 6.18. Description of the terms of the operation in terms of the ownership of the property Fillstyle
Note Procurement
6. Using property FillColor ( Fill color) set the color of the fill pattern
object.
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.
❒ Which of the tables used in the report will be the main, and which will be subordinate?
❒ 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.
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.
❒ 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.
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.
5. In the New Report dialog box that opens (Fig. 7.2), select the Report Wizard option.
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).
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. 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.
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
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.
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.
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).
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.
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).
Îïöèÿ Remarks
Detail and Summary (Custom and Ïðè óñòàíîâêå ýòîé îïöèè â îò ÷ åòå îòîáðàæàåòñÿ îáëàñòü äàííûõ, ïðîìåæóòî ÷ íûå
Final) èòîãîâûå çíà ÷ åíèÿ ïî ãðóïïèðîâêàì è êîíå ÷ íûå èòîãîâûå çíà ÷ åíèÿ ïî îò ÷ åòó
164 Chapter 7
Îïöèÿ 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).
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.
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).
Îïöèÿ 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
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.
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.
Button Remarks
turn off
Button Remarks
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:
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:
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
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).
In the Report and Label Print Options dialog box, you can specify criteria for selecting the records printed in the report
(Table 7.8).
Êðèòåðèé 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
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);
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
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.
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)
Page footer In case of a negative contact, the result is a positive result, but it is not necessary.
(The last collector)
❒ Environment Definition
❒ Placement of objects in the report: text, fields, lines, rectangles and drawings
❒ Saving Report
176 Chapter 8
❒ 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.
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
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.
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.
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.
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
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.
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).
4. Set the style, style, color, and size of the characters of the selected objects.
All information related to the environment is stored in the report description file.
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
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:
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).
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.
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:
❒ 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).
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
Îïöèÿ 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.
More Remarks
From left Saving from the left side of the page for more information
(Left side of the page)
Height Accessibility
(Height)
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.
End Remarks
Use font script Use the same method as the remote controller and the remote control
(Use a simulator) in addition to the
Region Color ( Color) contains the flags shown in the table. 8.7.
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
Region Also print ( Print) contains flags, the description of which is given in table. 8.8.
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.
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 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)
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.
The tab contains buttons, the purpose of which is described in table. 8.10.
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
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:
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.
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:
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
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.
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:
After completing the expression, click Ok to close the dialog box Expression Builder ( Expression builder).