- The different types of controls
- Short description of the different types of controls
- Static control
- Item control
- Calculated control
- Image control
- Bar Code control
- RTF control
- Preset control
- Chart control
- Shape control
- Check Box control
- Internal Report control
- URL Link control
- Edit control
- HTML control
The different types of controls
Several types of controls can be handled in a report created by the report editor: Note: See the online help about each type of control for more details.
Short description of the different types of controls
Static control The "Static" control is used to display a character string. This character string can contain: - the content of an item (or variable) found in the data source of the report.
- the content of another control found in the report.
- a value defined by programming.
To insert the value of a report item or control into the text, the name of the item or control must be entered between the [% and %] characters. For example, the caption can correspond to: The [%SupplierName%] supplier sells the [%ProductName%] product at [%PriceIOT%]. The SupplierName, ProductName and PriceIOT items will be replaced by their value during the execution of the report. The character string can be entered over several lines. In this case, the control must be a multi-line control and its size must be large enough. Reminder: The "Auto-sizable" option is used to automatically increase the size of the control according to its content. Examples: Modifying the caption The caption of a "Static" control can be modified: - by programming (..标签).
- in the report editor. In this case, two methods are available:
- Method 1:
- Select the control. The selection handles appear around the control.
- Click the control again. The mouse cursor turns into an edit cursor.
- Enter the new caption of the control.
- Modify (if necessary) the formatting via the formatting toolbar:Modify (if necessary) the formatting of the caption via the layout options found on the "修改" pane, in the "快速编辑" group of the ribbon:
- Method 2:
- Select the control.
- Display the description window of the control ("Description" from the popup menu of the control).
- Enter the new caption in each language supported by the control.
- Modify (if necessary) the formatting in the "Style" tab.
Multilingual captionsIf your application or your site is multilingual, a different caption can be entered for each language supported by the report. The corresponding caption will be printed according to the runtime language of the project. Transforming a "Static" control into an "RTF" control To display text in RTF format in a "Static" control, check "RTF format" in the "Details" tab of the control description ("Description" from the popup menu of the control). The "Static" control becomes an "RTF" control. All the characteristics of the "Static" control are kept. See Static control for more details.
Item control The "Item" control is used to edit the content of an item found in a data file. The item can be: - an item found in the data source of the report (data file, query, variable, ...).
- an item of a file accessible by a link.
This control can also be assigned by programming. Examples: To define the item linked to the "Item" control: - Display the "Link" tab in the description window of the control ("Description" from the popup menu of the control).
- To link the control to an item or to a variable that belongs to the data source of the report, select this item in the "Linked item" list.
- To link the control to an item that does not belong to the data source of the report, select "Multi-file" and select the item linked to the current control.
Specific "Item" control: "Currency + Euro"If the type of the "Item" control is "Currency + Euro", you have the ability to manage: - the stored currency: currency of the data found in the data source of the report. If the control is handled by programming, the currency used for the value will be the stored currency.
- the display currency: currency used to display the value when printing the report. This currency can differ from the stored currency. The conversion is automatically performed.
- the dual display: two "Currency + Euro" controls can be linked. In this case, the report editor distinguishes between two types of controls:
- the base control: this control contains the value found in the data source of the report.
- the tracker control: this control is used to display the value of the base control in the selected currency.
See the Currency + Euro type and the Item control for more details.
Calculated control The "Calculated" control is used to perform calculations in a report. These calculations can be made: - on an item of the data source.
- on a control found in the report.
- by programming.
Examples: Specific "Calculated" control: "Currency + Euro" If the type of the "Calculated" control is "Currency + Euro", you have the ability to manage: - the stored currency: currency of the data found in the data source of the report. If the control is handled by programming, the currency used for the value will be the stored currency.
- the display currency: currency used to display the value when printing the report. This currency can differ from the stored currency. The conversion is automatically performed.
- the dual display: two "Currency + Euro" controls can be linked. In this case, the report editor distinguishes between two types of controls:
- the base control: this control contains the value found in the data source of the report.
- the tracker control: this control is used to display the value of the base control in the selected currency.
See the Currency + Euro type and the Calculated control for more details.
Image control An "Image" control is used to display an image in the report. The image displayed in the control can: - be selected via the file picker (from the description window of the control).
- correspond to the content of an item found in the data source (for example, if the data source is a HFSQL file, the item can be an Image memo or a character string containing the full path of the image).
The "Image" control is linked to this item.
To define the item or the variable linked to the "Image" control: - Display the "Link" tab in the description window of the control ("Description" from the popup menu of the control).
- To link the control to an item or to a variable that belongs to the data source of the report, select this item in the "Linked item" list.
- To link the control to an item that does not belong to the data source of the report, select "Multi-file" and select the item linked to the current control.
Multilingual imagesIf your application or your site is multilingual, a different image can be selected for each language supported by the report. This option is useful when the images contain a text for example. The corresponding image will be printed according to the runtime language of the project. See The Image control for more details.
Preset control The preset control is used to display current information without any programming. A "Preset" control can be inserted into a report to display the following information: - System date,
- System Time,
- Number of the current page,
- Total number of pages in the report,
- Number of the current page in relation to the total number of pages in the report.
Example: To modify the type of information displayed in a "Preset" control: - Display the "General" tab in the description window of the "Preset" control ("Description" from the popup menu of the control).
- Select the type of displayed information ("Type" combo box).
- Validate.
See Preset control for more details.
Chart control The "Chart" control is used to view and print a chart in your reports. The available types of charts are as follows: - Pie, donut, semi-circular.
- Bar chart (grouped or stacked, vertical or horizontal)
- Line, area
- Scatter, radar
17版本和更高版本Bubble chart 17新版本Bubble chart Bubble chart- Stock chart (Candlestick, MinMax or BarChart).
Notes:- This control is not available in WinDev Mobile.
- This control cannot be linked to a variable.
Example: Information specific to the chart creation A wizard for chart creation is automatically started. This wizard is used to enter the information required to create the Chart control. This information is as follows: - the type of chart (stock, pie, line, ...).
- the mode for filling the chart (source identical to the one of the report or fill by programming).
- the number of series.
- the source of the caption for the series. This caption comes from a control or from an item found in the data source associated with the report. This caption corresponds to:
- the label of a data category (or section).
- the label of a data series.
| | Category label | Series label |
- For each series:
- the color and the caption of the series.
- the source of the series. The values of the series come from a control or from an item found in the data source associated with the report.
- the fill block.
- the frequency of the marks on the vertical/horizontal axis of the chart (if necessary).
- the style of the chart (relief, color gradients and gridlines).
- the titles of the axes if necessary.
You also have the ability to create a Chart report or a Table + Chart report. See The different types of reports for more details.Notes:- The series of the Chart control can be linked to an Array variable.
Example: Information specific to the chart creation A wizard for chart creation is automatically started. This wizard is used to enter the information required to create the Chart control. This information is as follows: - the type of chart (stock, pie, line, ...).
- the parameters of the chart: title, legend, 3D chart, display of labels, ...
- the parameters of axes: titles, grid, ...
- the characteristics of series:
- the source and the data displayed by the category labels (programming, data file, query, WLanguage array, data source of report).
- the name of the series (used for the series labels):
- the source of the series (programming, data file, query, WLanguage array, data source of report)
- the data displayed by the series.
- the thickness of the line, the color and type of points.
Note: if the data source correspond to the data source of the report, you have the ability to define:- the fill block,
- the control or the item corresponding to the series,
- the selection mode of data.
See Chart control for more details.
Shape control A "Shape" control is used to insert geometric shapes into a report. You have the ability to insert: - horizontal or vertical lines,
- circles,
- rectangles (with straight or rounded borders).
The style, the thickness and the color of the line can be configured.
Check Box control A "Check Box" control corresponds to a box to check. If the value of the control is set to 真, the box is checked::  If the value of the control is set to 假, the box is unchecked:  A "Check box" control can be linked to an item or variable found in the data source of the report. For example, if the data source corresponds to a HFSQL file, the item can be a boolean or a check box. The size, the background color and the color of the check box can be configured. Example: To define the item or the variable linked to the "Check Box" control: - Display the "Link" tab in the description window of the control ("Description" from the popup menu of the control).
- To link the control to an item or to a variable that belongs to the data source of the report, select this item in the "Linked item" list.
- To link the control to an item that does not belong to the data source of the report, select "Multi-file" and select the item linked to the current control.
Internal Report control The "Internal report" controls are used to print several reports (secondary reports) in a single report (main report) without programming. For example, the following main report is made of two secondary reports printed side-by-side: - a report displaying the data in a table.
- a report displaying the data in a chart.
See Internal report for more details. Benefits of internal reports compared to the nested reports The report editor can also be used to simultaneously print several reports via nested reports. However, the nested reports are a bit more complicated to use. Indeed, the nested reports require: - the use of 打印报表 to print the secondary report.
- the obligation to print the nested report after the main report. These reports cannot be printed side by side.
The internal reports allow you to print several reports without programming: - one below another,
- side by side.
See Nested reports for more details.
URL Link control A "URL link" control is used to insert links into a report. You have the ability to insert: - a link to an email address,
- a link to an Internet site,
- ...
The "URL Link" control is enabled only if the report is printed in an HTML file. Otherwise, the "URL link" control is visible but it is disabled. Example: To define the item or the variable linked to the "URL link" control: - Display the "Link" tab in the description window of the control ("Description" from the popup menu of the control).
- To link the control to an item or to a variable that belongs to the data source of the report, select this item in the "Linked item" list.
- To link the control to an item that does not belong to the data source of the report, select "Multi-file" and select the item linked to the current control.
Edit control An edit control is used to enter and display text in a report. You can use an edit control: - to allow the user to enter the information to print,
- to allow the user to modify the information to print,
- ...
The edit control is enabled only if the report is displayed in "Print preview" mode or if it is printed in a PDF file. In the other cases, the edit control is visible but it is disabled. Characteristics of edit controls When creating an edit control in a report, you have the ability to define: - the type of control (text, numeric, date, time),
- the associated mask: the available masks are the ones supported by the PDF format. They are available for the numerics, the dates and the times.
- the input size, which means the maximum number of characters allowed in the control. If this parameter is set to 0, there is no limit.
- the horizontal alignment,
- the initial value,
- the style of the caption and input area.
Notes: - Multi-line edit control: if the users enter more lines than what is visible, the non-visible lines will not be printed. During the input, the edit controls manage a vertical scrollbar.
- Style of the input area: In this version, only the "Arial" font can be used.
- The edit control is not linked to an item found in a file or in a query. To display information coming form a file or from a query, the control must be assigned by programming.
- The border of the input area cannot be configured (thickness, color, ...).
- No currency type can be used (the Euro symbol is not supported).
See Editable reports for more details.
18版本和更高版本 18新版本
|
|
| | |
|