- The different types of controls
- Short description of different types of controls
- Static 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 control The "Static" 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 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.
Remark: The item or variable bound to the control is defined in the "Binding" tab of the control description window. - the content of another control found in the report.
- a value defined through programming.
To insert the value of a report item or control into the text of the Static control, enter the item or control name between [% and %]. For example, the text of the control can correspond to: The [%SupplierName%] supplier sells the [%ProductName%] product at [%PriceIOT%]. SupplierName, ProductName and PriceIOT will be replaced with their value when the report is executed. Remark: If the Static control must display a text on several lines, all you have to do is choose the "Multiline text" type. In this case, the control size must be large enough. Reminder: The "Auto-resizing" option ("UI" tab in the control description window) is used to automatically enlarge the control according to its content when printing. Modifying the caption of a Static control The caption of a "Static" 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 a text caption: via the formatting options on the "Modification" tab, in the "Quick edit" group:
- for an RTF caption: via the formatting toolbar that is displayed above the control:
- 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 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 control For a "Currency + Euro" Static control, you have the ability to manage: - the stored currency: currency of the data in the report data source. If the control is handled through 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 bound. In this case, the report editor distinguishes between two types of controls:
- the base control: this control contains the value in the report data source.
- the tracker control: this control is used to display the value of base control in the selected 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" control: "Currency + Euro"For a "Currency + Euro" Calculated control, you have the ability to manage: - the stored currency: currency of the data in the report data source. If the control is handled through 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 bound. In this case, the report editor distinguishes between two types of controls:
- the base control: this control contains the value in the report data source.
- the tracker control: this control is used to display the value of base control in the selected 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.
Remark: The item (or variable) bound to the control is defined in the "Binding" 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. The corresponding image will be printed according to the runtime language of project.
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.
![iPhone/iPad iPhone/iPad](https://doc.windev.com/ext/images/us/IPHONE.png?1493160723) ![IOS Widget IOS Widget](https://doc.windev.com/ext/images/us/WIDGETIOS.png?1313293721) 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 chart, display of labels, ...
- the parameters of axes: titles, grid, ...
- 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 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.
Remark: if the data source corresponds to the report data source, you can 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: ![Checked box Checked box](https://doc.windev.com/en-US/images/image.awp?langid=3&name=Interrupteur_CaseCochee.gif&-1655741150) If the control value is set to False, the box is unchecked: ![Unchecked box Unchecked box](https://doc.windev.com/en-US/images/image.awp?langid=3&name=Interrupteur_CaseDecochee.gif&864979503) 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:
Remark: The item or variable bound to the control is defined in the "Binding" 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. Remark: The item or variable bound to the control is defined in the "Binding" 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 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 by programming.
- The borders of the input area cannot be configured (thickness, color, etc.).
- No currency type can be used (the Euro symbol is not supported).
![iPhone/iPad iPhone/iPad](https://doc.windev.com/ext/images/us/IPHONE.png?1493160723) ![IOS Widget IOS Widget](https://doc.windev.com/ext/images/us/WIDGETIOS.png?1313293721) This type of control is not available (Acrobat on iOS does not support the input).
For more details, see Editable reports.
Related Examples:
|
Training (WINDEV): WD Reports
[ + ] This example presents the different methods for creating a report: - prints based on different data sources (queries, variables, ...) - prints based on controls (Table, Spreadsheet, PVT, ...) - printing composite reports - specific prints (portrait/landscape, report with watermark, report with bar code, ...)
|
This page is also available for…
|
|
|