|
|
|
|
|
- Type of iteration
- Handling the controls bound to a data file via properties
- Modifying the properties of an iteration through a control based on a data file
- Memory table
- 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 "Opening" event of the report. Remark: This item is defined when creating the control or the report. This item can be modified in the "Data" tab of the element description. // -- Opening code of the report // Change the file to loop through RPT_Report1.SourceName = Customer // New browse item for "Customer" file RPT_Report1.BrowsedItem = CustomerID
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 by 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 by the BrowsedFile property).. If the "-" sign is used before the item name, the iteration is performed in descending order. Remarks Type of iteration - Automatic iteration: The data file is automatically looped through and the data is displayed. 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 iteration: The developer must define how to loop through the data file and how to display data in the Table control.
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.
Handling 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.
- Modify the relevant properties.
- Restart the iteration with the BrowsedFile property.
This method is used to optimize the modifications performed. Indeed, each one of the modifications performed individually restarts the iteration. These operations can become quite slow when they are performed on large data files. Memory table 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 belong to the data file, to the query or to the 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 or Combo Box control populated programmatically must display data coming from a data file, a query or a view: - Create a List Box or Combo Box control populated programmatically in the editor.
- Use FileToMemoryList to initialize 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…
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|