PC SOFT

ONLINE HELP
FOR WINDEV, WEBDEV AND WINDEV MOBILE

Home | Sign in | English US
  • Overview
  • Operating mode
  • Principle
  • Printing the report created by the developer
  • Direct print of the spreadsheet control
  • Customizing the setting window for printing the spreadsheet
WINDEV
WindowsLinuxUniversal Windows 10 AppJavaReports and QueriesUser code (UMC)
WEBDEV
WindowsLinuxPHPWEBDEV - Browser code
WINDEV Mobile
AndroidAndroid Widget iPhone/iPadApple WatchUniversal Windows 10 AppWindows Mobile
Others
Stored procedures
Overview
A Spreadsheet control proposes an automatic popup menu allowing the user to perform several operations on the data displayed in the control.
One of the options found in this popup menu allows the user to print the content of the Spreadsheet control ("Print").
Operating mode

Principle

Several cases may occur:
  • If a report was created on this Spreadsheet control by the developer, this report is printed. See Spreadsheet control in a report for more details.
  • If no report is linked to this Spreadsheet control, the user can print the content of the Spreadsheet control found in the window.
Notes:
  • The "Print" option found in the popup menu of Spreadsheet controls requires the print libraries of the WINDEV framework.
  • By programming:
    • AAFExecute (or ExecuteAAF) associated with the aafPrintSpreadsheet constant is used to print the specified Spreadsheet control.
    • AAFDisable (or DisableAAF) associated with the aafPrintSpreadsheet constant deletes the "Print" option for the specified Spreadsheet control.
    • AAFChangeCaption associated with the aafPrintSpreadsheet constant is used to modify the caption of the "Print" option for the specified Spreadsheet control.

Printing the report created by the developer

If a report was created on the Spreadsheet control by the developer, the "Print" option will be used to print this report. No specific programming is required.
See Spreadsheet control in a report for more details.

Direct print of the spreadsheet control

A window proposes to the user:
  • to print in portrait mode or in landscape mode.
  • the options for scaling the document.
The content of the Spreadsheet control is viewed in the print preview.
If the number of rows found in the Spreadsheet control is quite important (more than 10 000 rows), the application asks the user for confirmation (the print may be quite long and it may use a lot of memory).
The characteristics of the print are as follows:
  • The current worksheet displayed in the Spreadsheet control is printed.
  • The title of the print corresponds to the title of the Spreadsheet control. The window title is used if no title was specified for the control.
  • The titles of columns are printed on each page.
  • The print respects the background colors used for the different cells found in the Spreadsheet control.
  • The date of the day is printed in the top right corner.
  • The number of the current page and the total number of pages are printed in the bottom right corner.

Customizing the setting window for printing the spreadsheet

WINDEV allows you to include the setting window for printing the spreadsheet used by the AAF in your application. You will have the ability to customize:
  • the appearance of this window (modification of skin template for example),
  • the languages supported by this window. This feature is very useful when translating this window into the different languages proposed by the application.
To include the window for configuring the print in your application:
  1. On the "Project" pane, in the "Project" group, expand "Import" and select "WINDEV elements and their dependencies".
  2. Select the sub-directory containing the elements to import. The window for print configuration is found in the "Programs\Data\Preset windows\AAF" sub-directory of the setup directory of WINDEV.
  3. WINDEV lists the elements found in the directory. This directory contains the different elements corresponding to the customizable AAFs. The window to import is named "WinDevAaf_ConfigSpreadsheetPrint.wdw".
  4. Validate. The window is included in the project and it can be modified. This custom window will be automatically taken into account when running the application.
Notes:
  • The window must not be renamed.
  • If this window is included in your application, you may not benefit from the improvements made to this window during the different updates. Don't forget to check whether this window has evolved.
  • Caution: To modify this window, the corresponding file must not be read-only. Modify the characteristics of the file in Windows if necessary.
Minimum required version
  • Version 21
Comments
Click [Add] to post a comment