- Principle for printing a report
- Report with lower and upper bounds
- Running a query and report based on this query
- Print destination
- Passing parameters
- Printing a component report
- RPC and independent HFSQL context
- Nested reports
<Report>.Print (Function) In french: <Etat>.Imprime
// Simple print on printer RPT_Invoice.Print()
Syntax
<Result> = <Report name>.Print([<Parameter 1> [... [, <Parameter N>]]])
<Result>: Type of result returned by the report (optional) Versions 20 and laterValue returned by printing the report. This value is returned: - by the RESULT keyword, in the closing code of the report.
- by ..ReturnedValue used before closing the report.
New in version 20Value returned by printing the report. This value is returned: - by the RESULT keyword, in the closing code of the report.
- by ..ReturnedValue used before closing the report.
Value returned by printing the report. This value is returned: - by the RESULT keyword, in the closing code of the report.
- by ..ReturnedValue used before closing the report.
<Report name>: Control name Name of report, defined in the report editor. <Parameter 1>: Optional parameters (the type corresponds to the parameter type) Optional parameter expected by the report. This parameter was defined in the opening code of report. This parameter can be the name of a view, the name of a memory zone, etc. Caution: If lower bounds and upper bounds have been specified for the report, the first two parameters must correspond the lower bound and to the upper bound (respectively). <Parameter N>: Optional parameters (the type corresponds to the parameter type) Optional parameter expected by the report. This parameter was defined in the opening code of report. This parameter can be the name of a view, the name of a memory zone, etc. Caution: If lower bounds and upper bounds have been specified for the report, the first two parameters must correspond the lower bound and to the upper bound (respectively). Remarks Principle for printing a report <Report>.Print reads the report data source (data files, query, Table control, etc.). <Report>.Print prints the Body block for each record. The other blocks are printed when necessary: - The Start of document block will be printed at the beginning of document.
- The End of document block will be printed at the end of document.
- The Page header block will be printed at the top of each page.
- The Page footer block will be printed at the bottom of each page.
- If there is a break, the Body block of the break will be located between the Break header block and the Break footer block.
Report with lower and upper bounds If the lower and upper bounds were specified when the report was created in the report editor, the first two parameters passed to the report via <Report>.Print must correspond to the lower bound and to the upper bound, respectively. Example: a report was created on Customer file. This report browses the file on the "CustomerNum" key item. This report was defined as being bounded, with specified minimum and maximum bounds ("Data" tab in the report description window. The following code is used to print the report for customers 2 to 5:
iDestination(iViewer) RPT_Customers_Prospects.Print("2", "5")
Running a query and report based on this query Print destination You can set the print destination of the report using iDestination. Printing a component report To print a component report, use the name of component report (the component being included in the project). For example:
If a conflict occurs with a project element, the name of the element must be prefixed by the name of the component. For example:
MyComponent.Report.Print()
To use the name of the report in a variable, the name of the component must be specified. For example:
sReport is string = "MyComponent.MyReport" sReport.Print()
Nested reports You have the ability to call <Report>.Print within the same report. See the help about the Nested reports for more details. Business / UI classification : Neutral code Component : wd260etat.dll
This page is also available for…
|
|
|