|
|
|
|
|
- Type of iteration
- Manipulating the controls bound to a data file via properties
- Modifying the properties of an iteration through a control based on a data file
- Table populated programmatically
- List Box and Combo Box control populated programmatically
- Limitations
BrowsedItem (Property) In french: RubriqueParcourue
For controls, the BrowsedItem property is used to: - Get the item used to automatically loop through controls based on a data file.
- Change the item used to automatically loop through controls based on a data file. Then, the iteration is reinitialized.
For a report based on a file, the BrowsedItem property is used to change the item used to loop through the data file. In this case, this property can only be used in the "Open" event of the report. Remark: This item is defined when the field or report is created.. You can change this item in the "Data" tab of the description window.
ETAT_Etat1.NomSource = Client
ETAT_Etat1.RubriqueParcourue = IDClient
Syntax
Getting the item used for the automatic iteration in a control based on a data file Hide the details
<Browsed item> = <Control used>.BrowsedItem
<Browsed item>: Character string Name of the item used to automatically loop through the specified control. This item belongs to the data file the control is based on (returned or modified with the BrowsedFile property). If the "-" sign is used before the item name, the iteration is performed in descending order. <Control used>: Control name Name of the control to be used.
Changing the item used for the automatic iteration in a control based on a data file Hide the details
<Control used>.BrowsedItem = <New item>
<Control used>: Control name Name of the control to be used. <New item>: Character string Name of the new item that will be used to automatically loop through the specified control. This item must belong to the data file the control is based on (returned or modified with the BrowsedFile property). If the "-" sign is used before the item name, the iteration is performed in descending order. Remarks Type of iteration - Automatic traversal: Data file browsing and field display are automated.. No specific programming is required.
The sort is performed on the search item defined in the "Content" tab of the object description. If a filter is specified ("Filter on the search item" in the "Content" tab of the object description), this filter is used. No iteration process is executed for the specified object. - Programmed path: The developer must program the path of the data file and the display of data in the Table field..
The "Read the first record", "Read the previous record", "Read the next record" and "Read the last record" processes are run. A programmed iteration allows you to sort and filter records with precision. However, a programmed iteration is slower and more complex than an automatic iteration.
Manipulating the controls bound to a data file via properties - The records displayed in a control bound to a file come from the data file or from the query specified with the BrowsedFile property.
- The sort direction is defined by the BrowsedItem property.
- The records can be filtered using the Filter property or the HFilter function.
Modifying the properties of an iteration through a control based on a data file - Stop the iteration by assigning an empty string ("") to the BrowsedFile property.
- Change the relevant properties.
- Restart the iteration with the BrowsedFile property.
This method is used to optimize the modifications performed. Each one of the modifications made individually restarts the iteration. These operations can become quite slow when they are performed on large data files. Table populated programmatically If a Table control populated programmatically must display data coming from a data file, a query or a view: - Create a Table control populated programmatically in the editor.
- In the code of the application, specify the item to loop through with the BrowsedItem property. This item must be in the data file, query or view whose data will be displayed in the Table control populated programmatically.
- Use FileToMemoryTable to initialize the Table control with the desired data. The data will be sorted according to the specified search item.
- The DisplayedItem property will be automatically initialized.
List Box and Combo Box control populated programmatically If a List Box control or Combo Box control is programmed to display data from a data file, query or view: - Create a List Box or Combo Box control populated programmatically in the editor.
- Use FileToMemoryList to populate the List Box or Combo Box control with the desired data.
- The BrowsedFile, DisplayedItem, BrowsedItem and StoredItem properties will be automatically initialized.
Limitations The BrowsedItem property applies only to: - the reports whose data source is a data file.
- the controls (List Box, Table and Combo Box) of a window.
This page is also available for…
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|