|
|
|
|
|
- Configuring the print preview
- Reports not created in the report editor
- Warning message (syntax 1)
- Configuring the different print modes
iParameterPreview (Function) In french: iParamètreAperçu
Warning
From version 25, the print preview has been renamed to "Report viewer". It is now recommended to use iParameterViewer.
Configures the print preview: - display a message regarding the resources of current computer.
- display or hide the ribbon tabs and buttons. For more details, see Print preview.
- the export parameters in the mini-preview window.
Remarks: - When printing a programmed report, all the print buttons are available in the print preview.
- By default, all the buttons for printing a report created with the report editor are available. iParameterPreview can only be used to configure the buttons defined as visible in the report editor.
- Two additional buttons may appear in the print preview if the application allows "Reports & Queries" (provided with WINDEV) to be run. These buttons are used to create and edit reports with "Reports & Queries". These buttons are displayed only:
- If the project allows Reports and Queries to be run ("Advanced" tab of the project description).
- If the report can be edited with "Reports & Queries" ("Details" tab of the report description).
// No button in the print preview iParameterPreview(iButtonNone) iPreview() iPrintReport(RPT_MyReport)
// Display the printer buttons only iParameterPreview(iButtonPrinter) iPreview() iPrintReport(RPT_MyReport)
// Display the Printer, PDF and WORD buttons in the print preview iParameterPreview(iButtonPrinter + iButtonPdf + iButtonWord) iPreview() iPrintReport(RPT_MyReport)
// Delete the Email buttons from the print preview iParameterPreview(iButtonAll - iButtonEmail - iButtonEmailPdf) iPreview() iPrintReport(RPT_MyReport)
// Display the warning message every 2000 pages iParameterPreview(iButtonAll, 2000) // Print a report from the print preview iPrintReport(RPT_MyReport)
// Display the thumbnail pane in the print preview iParameterPreview(iThumbnailPane, True) // Print a report from the print preview iPrintReport(RPT_MyReport)
Syntax
Displaying (or not) the different options in the toolbar of print preview Hide the details
iParameterPreview(<Options> [, <Warning>])
<Options>: Integer constant (or combination of constants) Buttons that will be displayed in the print preview: | | iButtonAll | All the buttons and toolbars are visible. | iButtonAnnotation | - Until version 19: The toolbar used to write annotations in the report is visible.
- From version 20: The "Annotation" button is available in the "Preview" tab. The "Annotate" tab used to write annotations in the report is visible. For more details on this tab, see "Annotate" tab.
This constant is not taken into account in the mini-preview. | iButtonBlackAndWhite | The button used to print the document in black and white is visible. This constant is not taken into account in the mini-preview. | iButtonDuplex | The button used to print the document on both sides is visible. This constant is not taken into account in the mini-preview. | iButtonDuplicate | - Until version 19: The button used to save a duplicate copy of current report is visible.
- From version 20: The "Export" tab is visible. The button used to save a duplicate copy of the current report is displayed in the "Export" tab. For more details on this tab, see "Export" tab.
This constant is not taken into account in the mini-preview. | iButtonEmail | - Until version 19: The button used to print the report in a new email is visible.
- From version 20: The "Export" tab is visible. The button used to create an email with the content of the integrated report is displayed in the "Export" tab. For more details on this tab, see "Export" tab.
| iButtonEmailPdf | - Until version 19: The button used to print the report in a file linked to a new email is visible.
- From version 20: The "Export" tab is visible. The button used to create an email with an attached PDF is displayed in the "Export" tab. For more details on this tab, see "Export" tab.
| iButtonExcel | - Until version 19: The button used to print the report in an Excel file is visible.
- From version 20: The "Export" tab is visible. The button used to create an Excel file from the current print is displayed in the "Export" tab. For more details on this tab, see "Export" tab.
| iButtonHtml | The button used to print the report in an HTML file is visible. | iButtonNone | - Until version 19: No button or toolbar is displayed.
- From version 20: Only the "Preview" pane of print preview is displayed. For more details on this tab, see "Preview" tab.
| iButtonPdf | The button used to print the report in a PDF file is visible. | iButtonPrinter | The two buttons used to start the print are visible. This constant is not taken into account in the mini-preview. | iButtonReportCreation | - Until version 19: The button used to create a report with "Reports and Queries" is visible.
| iButtonReportModification | The button used to modify the current report with "Reports and Queries" is visible. This constant is not taken into account in the mini-preview. | iButtonSearch | The toolbar used to perform a search in the report is visible. This constant is not taken into account in the mini-preview. | iButtonSnapshot | The button used to take a snapshot of report (or report section) is visible. This constant is not taken into account in the mini-preview. | iButtonTextSelection | The button used to select a text is visible. This constant is not taken into account in the mini-preview. | iButtonWatermark | The button used to add and configure a text in watermark is visible. This constant is not taken into account in the mini-preview. | iButtonWord | The button used to print the report in a RTF file is visible. | iButtonXml | The button used to print the report in an XML file is visible. |
<Warning>: Optional integer Number of pages from which a warning message is displayed. This message informs the user that the memory resources of the current computer may become insufficient if the remaining pages are displayed. This parameter is set to 1000 by default. The message will never be displayed if this parameter is set to 0.
Configure the print preview options Hide the details
iParameterPreview(<Options> , <Display>)
<Options>: Integer constant Element to configure: | | iStorePaneRibbon | Allows you to store the ribbon pane displayed by the print preview. By default, the last tab is not saved. Instead, the print tab is displayed when the preview is opened. | iThumbnailPane | Configure the display of panes for displaying thumbnails. |
<Display>: Boolean - True if the thumbnail pane must be displayed in the print preview,
- False if the thumbnail pane must not be displayed.
By default, the thumbnail pane is displayed in the print preview.
Remarks Configuring the print preview - The configuration defined by iParameterPreview is effective until:
- the next call to iReset
- the next call to iParameterPreview.
- To configure the print preview of all application reports, iParameterPreview must be used in the project initialization code.
- The buttons in the preview can also be configured in the report editor ("UI" tab of the report description). In this case, iParameterPreview called before printing the report is used to hide the additional buttons. Buttons that are defined as invisible in the report will always remain invisible.
Remarks: - If the print preview allows you to send an email, the email characteristics can be configured by iParameterExport.
- The thumbnail pane can be shown or hidden through programming only.
Reports not created in the report editor When printing programmed reports (not created in the report editor), all the buttons found in the button bar are visible. Warning message (syntax 1) The warning message appears only when a report is printed. If the user clicks "No" to avoid displaying the following pages, the preview remains opened on the pages that are already displayed. In this case, the entire document is printed (or exported) from the print preview (and not only the pages displayed in the preview). Configuring the different print modes You have the ability to configure the options of the different print modes: Business / UI classification: Neutral code
This page is also available for…
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|