PC SOFT

ONLINE HELP
 WINDEVWEBDEV AND WINDEV MOBILE

Home | Sign in | English EN
This content has been translated automatically. Click here to view the French version.
  • Overview
  • Operating mode
  • Principle
  • Printing the report created by the developer
  • Direct printing of the Spreadsheet control contents
  • Customizing the Spreadsheet control print settings window
WINDEV
WindowsLinuxUniversal Windows 10 AppJavaReports and QueriesUser code (UMC)
WEBDEV
WindowsLinuxPHPWEBDEV - Browser code
WINDEV Mobile
AndroidAndroid Widget iPhone/iPadIOS WidgetApple WatchMac CatalystUniversal Windows 10 App
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 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. For more details, see Spreadsheet control in a report.
  • If no report is linked to this Spreadsheet control, the user can print the content of the Spreadsheet control found in the window.
Remarks:
  • The "Print" option found in the popup menu of Spreadsheet controls requires the print libraries of WINDEV framework.
  • Through programming:
    • the AAFExecute function used with the constant aafPrintSpreadsheet starts the printing of the specified Spreadsheet control.
    • the AAFDisable function used with the constant aafPrintSpreadsheet removes the "Print" option for the specified Spreadsheet control.
    • the AAFChangeCaption function used with the aafPrintSpreadsheet constant allows to modify the wording 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.
For more details, see Spreadsheet control in a report.

Direct printing of the Spreadsheet control contents

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 report viewer.
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 print characteristics are as follows:
  • The current worksheet displayed in the Spreadsheet control is printed.
  • The print title corresponds to the title of Spreadsheet control. The window title is used if no title was specified for the control.
  • The column titles are printed on each page.
  • The print respects the background colors used for the different cells found in the Spreadsheet control.
  • Today's date 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 Spreadsheet control print settings window

WINDEV offers the possibility to integrate the Spreadsheet control print configuration window used by the FAA 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" tab, in the "Project" group, expand "Import" and select "WINDEV elements and their dependencies".
  2. Select the subdirectory that contains the elements to import. The window for print configuration is found in the "Programs\Data\Preset windows\AAF" subdirectory of the setup directory of WINDEV.
  3. WINDEV lists the elements of 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.
Remarks:
  • 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 version required
  • Version 21
Comments
Click [Add] to post a comment