PC SOFT

WINDEV的在线文档

  • Overview
  • Creating a report on a TreeView Table control from the report editor
  • Creating a report on a TreeView Table control from the report editor
  • Characteristics of the report on a TreeView Table control
  • Test of the report
  • Printing a report on a TreeView Table control
  • Printing a report on a TreeView Table control
  • WinDev and WinDev Mobile example
文档页面当前正在翻译。对于此延迟我们深表歉意。
您可以自愿地帮助我们翻译您想要的文档段落,然后只需通过以下地址与我们联系: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本地访问

Report on a TreeView Table control

Overview
The report on a TreeView Table control is used to directly print the information displayed in a TreeView Table control found:
  • in a window or in a page of the application. This window or page must be displayed when printing the report.
  • in a window or in an internal page:
    • The window displaying the internal window must be displayed.
    • The page displaying the internal page must be displayed.
A report on a TreeView Table control can print:
  • all the rows displayed in the TreeView Table control.
  • the rows selected by the user (for the multi-selection TreeView Table controls where the rows are selected via the [Ctrl] key). This option is not available in WebDev.
  • the entire hierarchy.
  • the hierarchy visible in the TreeView Table control.
Note: Only a Treeview Table report can be created on a Treeview Table control.

Creating a report on a TreeView Table control from the report editor
The report editor allows you to create a TreeView Table report based on a TreeView Table control. Each row and each column found in the TreeView Table control are displayed in the TreeView Table report.

Once the report is created, the print must be programmed in WLanguage. See Printing a report on a TreeView Table control for more details.

ImportantReports & Queries cannot be used to create reports on a TreeView Table control. However, you have the ability to customize the reports on a TreeView Table control created in the standard report editor (color, fonts, size, ...).

Creating a report on a TreeView Table control from the report editor

To create a report on a TreeView Table control from the report editor:
  1. Clickamong the quick access buttons.
    • Click "Report" in the wheel that is displayed.The window for creating a new element is displayed: click "Report" then "Report".
    • The wizard for report creation starts.
  2. Choose a "TreeView Table" report.
  3. Select "From a TreeView Table control" and go to the next step.
  4. Specify:
    • the TreeView Table control on which the report will be based. Only the TreeView Table controls found in the windows or pages of the current project are proposed.
    • whether only the selected rows must be printed or whether all the control rows must be printed.
  5. Select the items (columns of TreeView Table control) to print and their position (associated block).
  6. Specify whether calculations must be performed on the numeric items.
  7. Specify the format of the sheet on which the report will be printed. The report is printed in A4 format by default.
  8. Select the skin template to use.
  9. Enter the name and title of the report (name of the ".WDE" file corresponding to the report). This name will be used to identify the report in your programs.WinDev You also have the ability to specify whether the report can be modified by the end user in "Reports and Queries".
  10. Validate the report creation.
  11. The report editor automatically proposes to change the format of the report.
  12. Specify the mode for reducing the report size:
    • 19版本和更高版本
      Print the report on several pages. In this case, the end user will have to group the pages. See Multi-page print for more details.
      19新版本
      Print the report on several pages. In this case, the end user will have to group the pages. See Multi-page print for more details.
      Print the report on several pages. In this case, the end user will have to group the pages. See Multi-page print for more details.
    • Use the landscape mode.
    • Reduce the size of the report. Caution: according to the reduction percentage, the printed report may become unreadable.
  13. The report currently created is displayed in the report editor.

Characteristics of the report on a TreeView Table control
A report on a TreeView Table control corresponds to a report on a Table control with additional characteristics.

The report includes a table. For more details, see:

In the report description, information specific to this type of report can be configured in the "Data" tab:
  • WinDev Printed rows: Like for the Table control, you have the ability to specify whether only the selected rows or all the control rows must be printed.
  • Printing the hierarchy: You have the ability to specify whether only the hierarchy displayed in the control must be printed or whether the entire hierarchy must be printed.

Test of the report

The test of a report on a TreeView Table control cannot be run from the report editor because the window or the page containing the TreeView Table control must be opened. To run the test of a report on a Treeview Table control, you must:
  • create (if necessary) a button in the window or in the page of the TreeView Table control. This button is used to print the report on the TreeView Table control (打印报表).
    Case of internal windows or internal pages: If the TreeView Table control is found in an internal window or in an internal page, we advise you to create the button in the internal window/page (and not in the host window/page).
  • run the test of the window containing the TreeView Table control then run the report test (via the button).
    Case of internal windows: the test must be run from the window that hosts the internal window.
  • run the test of the page containing the TreeView Table control then run the test of the report (via the button).
    Case of internal pages: the test must be run from the page that hosts the internal page.

Printing a report on a TreeView Table control

Printing a report on a TreeView Table control

A report on a TreeView Table control must be printed from the window (or from the page) displaying the TreeView Table control to print. You must:
  1. Create a button in the window (or in the page) containing the TreeView Table control.
  2. Configure the destination of the report print:
  3. Specify the name of the report to print with 打印报表.
Notes:
  • If additional parameters must be passed to the report, these parameters must be specified in 打印报表, after the name of the report to print. See Report with parameters for more details.
  • WinDev If the window containing the TreeView Table control, source of the report, is opened several times (non-modal opening by 打开子窗口), the full name of the TreeView Table control to print must be passed in parameter to the report. For example:
    // The ..全名 property will contain the name of the window
    // that must be opened with an alias to distinguish between each window
    打印报表RPT_Customer_TVTableTVT_Customer..全名)

    // Opening code of report:
    过程RPT_Customer_TVTablesNameSourceTVTable
    我的报表..数据源名称=NameSourceTVTable
  • WinDev ..仅选定行 is used to find out and modify the records that will be printed in the report: printing all the records or the selected records only.
  • ..保持可见层次 is used to find out and modify the print mode of the hierarchy: printing the entire hierarchy or printing the hierarchy that is visible in the control.

ImportantIn Reports & Queries, a report can be printed:
  • by starting a print ().
  • by running the report test ().
Therefore, no programming is required to print the report.

WinDev

WinDev and WinDev Mobile example

The information to print is contained in the TreeView Table control named "TVT_CustomerTable" found in the "WIN_Customer" window.

The report to print is named "RPT_TVTable_Customer" and it is printed when clicking the "BTN_Print" button.

In this example, the click code of the "BTN_Print" button is as follows:

In WinDev:

// Open the preview window
打印预览()
// Print the report based on the "TVT_CustomerTable" control
打印报表RPT_TVTable_Customer

In Windows Mobile:

// Select the printer
打印配置()
// Print the report based on the "TVT_CustomerTable" control
打印报表RPT_TVTable_Customer