- The different types of controls
- Short description of different types of controls
- Static Text control
- Calculated control
- Image control
- Bar Code control
- Preset control
- Chart control
- Shape control
- Check Box control
- Internal Report control
- URL Link control
- Edit control
- Signature control
The different types of controls Several types of controls can be handled in a report created by the report editor: Remarks: - For more details, see the online help about each type of control.
- The report editor also offers several controls that enable user interaction:
- Edit control.
Not available. - Check Box control.
- Combo Box control.
For more details, see Editable reports.
Short description of different types of controls Static Text control The "Static Text" control is used to display different types of data: - plain text, RTF, HTML, Markdown,
- numeric, currency, currency + Euro,
- date,
- time, duration.
To specify the type of data displayed in the control: - Go to the "General" tab in the Static Text control description window ("Description" in the control context menu).
- Select the type of information displayed ("Type" combo box).
- Validate.
The displayed data can contain: - the data from an item (or variable) in the report data source.
Note: The item or variable linked to the field is defined in the "Link" tab of the control description window. - the content of another control found in the report.
- a value defined programmatically.
To insert the value of a report item or control into the text of the Static Text control, enter the item or control name between [% and %]. For example, the field label might be: Supplier [%SupplierName%] sells product [%ProductName%] for [%PriceTTC%]. SupplierName, ProductName and PriceIOT will be replaced with their value when the report is executed. Note If the Static Text control is to display text on several lines, simply select the "Multiline text" type. In this case, the control size must be large enough. Reminder The "Ajuste automático" option ("UI" tab in the field description window) automatically increases the size of the field according to its content when printed. Modifying the caption of a Static Text control The caption of a "Static Text" control can be modified: - through programming (Static property).
- 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 input cursor.
- Enter the new text.
- Modify (if necessary) the formatting of the caption:
- for text labels: using the formatting options in the "Modificación" pane, in the "Edición rápida" ribbon group:
- in the case of an RTF-type label: thanks to the formatting toolbar displayed above the field:
- Method 2:
- Select the control.
- Open the control description window ("Description" in the context menu).
- Enter the new text in each language supported by the control.
- Modify (if necessary) the formatting in the "Style" tab.
Multilingual Static Text control If your application or your site is multilingual, a different caption can be typed for each language supported by the report. Depending on the language of the project, the corresponding text will be printed. "Currency + Euro" Static Text control For a "Currency + Euro" Static Text control, 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 through programming, the currency used for the value will be the stored currency.
- the displayed 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: you can connect two "Currency + Euro" controls. 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 base control in the requested currency.
For more details, see Currency + Euro type. 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.
- programmatically.
Examples:
Specific "Calculated" field: "Monetary + Euro".For a "Currency + Euro" Calculated control, 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 through programming, the currency used for the value will be the stored currency.
- the displayed 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: you can connect two "Currency + Euro" controls. 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 base control in the requested currency.
Image control An "Image" control is used to display an image in the report. The image displayed in the control can: - be selected from the control description window ("General" tab) by clicking :
- The "Browse" option is used to select an image file accessible from your computer.
- The "Catalog" button is used to choose an image found in the image catalog of WINDEV.
- correspond to the content of an item found in the data source (for example, if the data source is an HFSQL file, the item can be an Image memo or a character string containing the full image path). The "Image" control is bound to this item.
Note: The item (or variable) linked to the field is defined in the "Link" tab of the control description window.
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 for images with text, for example. Depending on the project language, the corresponding image will be printed.
To select image for each language, click and select "Multilingual". 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:- Go to the "General" tab in the "Preset" control description window ("Description" in the control context menu).
- Select the type of information displayed ("Type" combo box).
- Validate.
Chart control The "Chart" control is used to view and print a chart in your reports. The types of charts available are as follows: - Pie, donut, semi-circular.
- Column (clustered or stacked, vertical or horizontal).
- Line, area.
- Scatter, radar.
- Bubble chart.
- Stock chart (Candlestick, MinMax or BarChart).
Remarks: - This control is not available. To display a chart in a report, you can:
- Create a chart in a window via a Chart control.
- Save an image of the chart with grSaveImage.
- Display this image via an Image control in the report.
- Only the Chart controls created from version 17 (or updated) are available.
- The series of the Chart control can be bound to an Array variable.
Information specific to chart creation A chart creation wizard starts automatically. 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 chart parameters: title, legend, 3D, display of labels, ...
- the parameters of axes: title, gridlines, ...
- the characteristics of series:
- the source and data displayed by the category labels (programming, data file, query, WLanguage array, report data source).
- the name of the series (used for the series labels):
- the source of series (programming, data file, query, WLanguage array, report data source)
- the data displayed by the series.
- the line thickness, the color and the type of dots.
Note If the data source corresponds to the report data source, it is possible to define: - the fill block,
- the control or the item corresponding to the series,
- the selection mode of data.
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 line style, thickness and color can be entirely configured. Check Box control A "Check box" control corresponds to a box to check. If the control value is set to True, the box is checked: If the field value is Falsethe box is unchecked: A "Check box" control can be bound to an item or variable in the report data source. For example, if the data source corresponds to an HFSQL file, the item can be a boolean or a check box. The size, the background color and the color of check box can be configured. Example:
Note The item or variable linked to the field is defined in the "Link" tab of the control description window. 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.
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 call to iPrintReport 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.
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. When printing to PDF, only the links that correspond to site or page addresses are active. Note The item or variable linked to the field is defined in the "Link" tab of the control description window. Edit control An edit control is used to type and display text in a report. You can use an edit control: - to allow the user to type 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 to 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 the 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 caption and input area.
Remarks: - Multiline 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 input area: in this version, only the "Arial" font can be used.
- The edit control is not bound to an item in a data file or query. To display information coming form a file or from a query, the control must be assigned programmatically.
- The borders of the input area cannot be configured (thickness, color, etc.).
- No currency type can be used (the Euro symbol is not supported).
- This type of control is not available (Acrobat on iOS does not support the input).
For more details, see Editable reports.
Esta página también está disponible para…
|
|
|