Prints the content of the specified Table control without having to create a report based on the Table control. An AAF (Automatic Application Feature) allows the user to directly print the content of the Table control (see Automatic menu of Table controls
<Table>.Print is used to configure the print job:
- Ability to specify additional elements to be printed (date, number of pages, etc.).
- You can use iDestination to configure the destination of the print job.
// Specify the print job parameters
// Print to a PDF file named table.pdf, in portrait mode
// Forces the Table control print AAF to use
// the parameters of the Table control (cell color, etc.)
// Change the destination and the orientation.
// Print the Table control (without option, everything is displayed)
<Result> = <Table control>.Print([<Options>])
- True if printed successfully,
- False if an error occurred.
<Table control>: Control name
Name of the Table control to be used.
<Options>: Optional Integer constant (or combination of constants)
Table control print settings:
|WithAll||Prints the content of the Table content while taking all the options into account (corresponds to WithMultipageColumns + WithDate + WithNbRecords + WithNbPages + WithTitle)|
|WithDate||Prints the date at the top of the page.|
|WithMultipageColumns||If the Table control exceeds the page size, columns are printed over several pages.|
|WithNbPages||Prints the number of pages at the bottom of the page.|
|WithNbRecords||Prints the number of records at the end of the document. The caption used corresponds to the caption defined for the counter (in the Table control description).|
|WithTitle||Prints the title of the Table control at the top of the page. If the title of Table control is not visible, prints the window title.|
- The printout cannot be modified: it is not possible to add other elements. Page breaks are automatically defined.
- The total number of pages is not calculated in the following cases:
- if the print affects more than 3000 records.
- if the calculation of the total number of pages exceeds 4 seconds for a Table control file based on an HFSQL Client/Server data file.
- The print characteristics are as follows:
- If printed, the title will be the title of the Table control. The window title is used if no title was specified for the Table control.
- The column titles are printed on each page.
- To use the background colors used for the different cells in the Table control, call AAFConfigure with the aafPrintReportOnTable constant, as follows:
- The print job does not reflect the RTF attributes of the text in the Table control.
- The counters, totals, ... defined for the Table control are not printed. Only a counter for the number of rows found in the Table control can be printed below the control. The caption corresponds to the caption defined for the counter in the characteristics of Table control.
- If printed, the date appears in the upper-right corner.
- If printed, the current page number and the total number of pages are printed at the bottom right.
- The horizontal merge of columns is kept, except in the following cases:
- merge with an invisible column.
- merge of columns that "overlay" over 2 pages.
- Images in the Table control are printed only if the image paths are specified. Images in memos are not printed.
- The document is printed using the writing direction specified with the TextDirection property at window and / or Table control level.