ONLINE HELP
 WINDEVWEBDEV AND WINDEV MOBILE

Help / Developing an application or website / Controls, windows and pages / Controls: Available types / Spreadsheet control
  • Overview
  • Operating mode
  • Principle
  • Printing the report created by the developer
  • Directly print the content of the Spreadsheet control
  • 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
Spreadsheet controls include an automatic context menu that allows users to perform different actions on the data displayed in the control.
One of the options found in this context menu allows the user to print the content of Spreadsheet control ("Print" option).
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 in the context menu of Spreadsheet controls requires the print libraries of WINDEV framework.
  • Through programming:
    • AAFExecute associated with the aafPrintSpreadsheet constant is used to print the specified Spreadsheet control.
    • AAFDisable associated with the aafPrintSpreadsheet constant removes the "Print" option for the specified Spreadsheet control.
    • AAFChangeCaption with the affPrintSpreadsheet constant is used to change the text 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.

Directly print the content of the Spreadsheet control

If the Spreadsheet control contains several pages, a window will appear with the following options:
  • orientation used for printing.
  • document scaling.
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 upper-right corner.
  • The number of the current page and the total number of pages are printed in the lower-right corner.

Customizing the Spreadsheet control print settings window

WINDEV allows you to include Spreadsheet control print settings window 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 available in 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 print configuration window is in the "Programs\Data\Preset Windows\EN\AAF" subdirectory of the WINDEV installation directory.
  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

Last update: 09/04/2023

Send a report | Local help