PC SOFT

WINDEV的在线文档

  • Overview
  • Creating a control in a report
  • Creating a simple control
  • Creating a control from a control found in a dictionary
  • Creating a control from the clipboard content
  • Creating an Image control from an image file by Drag and Drop
  • Associating a control with an item of a data file or with a variable
  • Selecting and deleting the report controls
  • Selecting one or more controls in a report
  • Deleting one or more controls from a report
  • Copying the report controls
  • Overview
  • Copying a control into the same report
  • Copying a control from a report into another report
  • Copy the style of a control
  • Moving one or more report controls
  • Locking the controls
  • Aligning the report controls
  • Use an off-report control
  • Overview
  • Creating an "off-report" control
文档页面当前正在翻译。对于此延迟我们深表歉意。
您可以自愿地帮助我们翻译您想要的文档段落,然后只需通过以下地址与我们联系:info@cn.windev.com
产品
WinDevWebDev-服务器代码WebDev-浏览器代码WinDev Mobile报表和查询
平台
WindowsLinuxWindows MobileWindows PhoneWindows Store appsAndroidAndroid Widget iPhone/iPad
语言
JavaPHPAjax用户代码(MCU)外部语言
数据库
HFSQLHFSQL Client/Server存储过程HF 5.5OLE DBODBC本地访问

Handling the report controls

Overview
The different operations available for the report controls are as follows:Note: These operations differ for the controls belonging to a table. See Handling the cells of a report table for more details.

Creating a control in a report

Creating a simple control

To create a control in a report:
  1. Use:
    • "Insert .. New control" and select the type of control to insert.
    • the icons found in the popup toolbar of the report editor:
    On the "Creation" pane, click the type of control to create:
  2. Click the position where the control must be created in the report.

Creating a control from a control found in a dictionary

A report control can be created from a control from a control found in a dictionary. A dictionary is used to store several elements (controls, reports, ...) for a future use in new projects. See Dictionary for more details.

To create a control from a control found in a dictionary:

  1. Display the "Dictionary" pane.
  2. Open the dictionary if necessary ("Open" from the popup menu).
  3. Select the initial control found in the dictionary (in the "Report controls" category).
  4. Drag and Drop the control from the dictionary to the future position of the control in the report.
  5. Subscribe the created control to the dictionary if necessary. If the created control subscribes to the dictionary, the modifications made to the control found in the dictionary will be automatically applied to the created control. See Subscribing an element to the dictionary for more details.

Creating a control from the clipboard content

The report editor allows you to create some types of controls according to the clipboard content:
Clipboard contentType of created control
Unformatted text, retrieved in a text editor for example.Static control
Formatted text, retrieved in a text editor for example.RTF control
Image file, retrieved in the Windows explorer.Image control
Image, retrieved from Internet for example.Image control

To create a control from the clipboard content:
  1. Copy the element into the clipboard ([Ctrl]+[C] from the editor of the element).
  2. In the report editor, select "Edit .. Paste" (or press [Ctrl]+[V]).In the report editor, on the "首页" pane, in the "编辑" group, click "粘贴" (or press [Ctrl]+[V]).

Creating an Image control from an image file by Drag and Drop

The report editor allows you to create an Image control by performing a Drag and Drop of an image file found in the Windows explorer toward a WinDev report.

To create an Image control from an image file:
  1. Select the requested image file in the Windows explorer.
  2. Keep the left mouse button down and move the image file toward a report opened in the editor.
  3. Release the mouse button. An Image control associated with the image file is automatically created.
Note:
Windows支持的图片格式为:
  • Bitmap (*.BMP)
  • 图形交换格式(*.gif)
  • 联合图像专家小组(*.jpg ; *.jpeg)
  • 柯达照片CD(*.pcd)
  • PaintBrush(*.pcx)
  • Adobe Photoshop格式(*.psd)
  • TrueVision TARGA(*.tga)
  • 标记图像文件格式(*.tif ; *.tiff)
    注意: 不支持tiff 6.0标准的"tiled tiff"选项。 在这种情况下,我们建议您以tiff 5.0标准储存图片。
  • Portable Network Graphics (*.png)
  • Windows元文件(*.emf ; *.wmf)
  • 图标(*.ico ; *.icw)
  • 光标(*.CUR) *.cur
  • Portable Document Format (*.pdf)
  • 15版本和更高版本
    Scalable Vector Graphics (*.svg)
    15新版本
    Scalable Vector Graphics (*.svg)
    Scalable Vector Graphics (*.svg)
注意: 若想管理pdf和svg格式,您必须为Windows 2000以及更低版本的计算机安装GDIPLUS.DLL。 对于更高的版本,该DLL由Windows默认提供。 想了解更多信息,请查阅GDI+框架

Associating a control with an item of a data file or with a variable
You have the ability to associate:
  • a report control (Item, Calculated, Image, Bar Code , RTF, Check Box, Link or Chart control) with an item of a data file found (or not) in the data source of the report.
  • a report control (Item, Calculated, Image, Bar Code , RTF, Check Box, Link or Chart control) with a variable found in the data source of the report.

To associate an existing control with an item found in a data file or with a variable:

  1. Select the requested control.
  2. Display the "Link" tab (or the "Fill" tab for a chart) in the description window of the control ("Description" from the popup menu).
  3. Fill the information about the linked item.

Note: You also have the ability to create an Item control from an item found in a data file:

  1. In the "Analysis" pane, select the item that will be associated with the control to create.
  2. Drag and Drop the item toward the future position of the linked control.

Selecting and deleting the report controls

Selecting one or more controls in a report

The report editor allows you to select one or more report controls with the keyboard or with the mouse. See Select one or more controls for more details.

Deleting one or more controls from a report

To delete one or more report controls:
  1. Select the controls to delete.
  2. Press the [Del] key.

Copying the report controls

Overview

One or more controls can be copied into the same report or from a report to another report.

The description and the code of the copied control will be identical to the ones of the initial control.

Copying a control into the same report

To copy a control into the same report:
  1. Select the control to copy.
  2. Click the "Copy" icon () in the standard toolbar of the report editor.
    Note: You also have the ability to select "Edit .. Copy" or "Copy" from the popup menu of the control.
    On the "首页" pane, in the "编辑" group, click "复制".
    Note: You also have the ability to select "Copy" from the popup menu of the control.
  3. Click the "Paste" icon () in the standard toolbar of the report editor.
    Note: You also have the ability to select "Edit .. Paste" or "Paste" from the popup menu of the control.
    On the "首页" pane, in the "编辑" group, click "粘贴".
    Note: You also have the ability to select "Paste" from the popup menu of the control.
  4. Position the control with the mouse (the outline of the control appears in dotted lines and it helps you position the new control).

Copying a control from a report into another report

To copy a control from a report into another report:
  • 1st method:
    • In the first report, select the control to copy.
    • Click the "Copy" icon () in the standard toolbar of the report editor.
      Note: You also have the ability to select "Edit .. Copy" or "Copy" from the popup menu of the control.
    • Display the destination report in the report editor.
    • Click the "Paste" icon () in the standard toolbar of the report editor.
      Note: You also have the ability to select "Edit .. Paste" or "Paste" from the popup menu of the control.
    • Position the control with the mouse (the outline of the control appears in dotted lines and it helps you position the new control).
  • 1st method:
    • In the first report, select the control to copy.
    • On the "首页" pane, in the "编辑" group, click "复制".
      Note: You also have the ability to select "Copy" from the popup menu of the control.
    • Display the destination report in the report editor.
    • On the "首页" pane, in the "编辑" group, click "粘贴".
      Note: You also have the ability to select "Paste" from the popup menu of the control.
    • Position the control with the mouse (the outline of the control appears in dotted lines and it helps you position the new control).
  • 2nd method: (both reports must be displayed in the editor)
    • In the first report, select the control to copy.
    • Keep the left mouse button down and drag the control toward the destination report.
    • Release the mouse button once the control is positioned in the destination report (the outline of the control appears in dotted lines and it helps you position the pasted control).

Copy the style of a control

Copying the style of a control consists in copying the characteristics of a control style into another control. Only the style of the control is copied (not its content).

See Copying the style of a control for more details.

Moving one or more report controls

To move one or more report controls:
  1. Select the controls to move.
  2. Keep the left mouse button down and move the controls with the mouse. The real-time interface checker allows you to align the controls (see the paragraph below).
Notes:
  • A control necessarily belongs to a block.
  • The selected controls can also be moved with the arrow keys found on the keyboard. To speed up the move, press the [Ctrl] key together with the arrow key. To slow down the move, press the [Shift] key together with the arrow key.

Locking the controls

In some cases, you may want to lock the controls in a fixed position: in this case, the position of the control cannot be modified and the control is not selected during a selection performed with the lasso. This feature is often useful for the layout controls.

To lock a control:

  1. Select the control.
  2. Use:
    • "Lock" from the popup menu of the control.
    • [ALT] + [V].

Aligning the report controls

The report editor proposes several methods for aligning the controls found in a report:

Use an off-report control

Overview

In most cases, the controls belong to a report. Therefore, these controls appear in the report in edit mode and at run time.

A control can also be positioned in the home window of a report: the control is said to be "off report". This control will be visible in edit only. This control will not be printed.

An "off-report" control is used to store a report control without printing it. This allows you to use the content of the control in programming (like a variable).

Creating an "off-report" control

To create an "off-report" control:
  1. Select "Insert .. New control" and select the type of control to insert.
    Note: You can also use the icons found in the popup toolbar of the report editor.
    On the "Creation" pane, click the type of control to create.
  2. Click the left section of the home window where the control must be created.