Report.PrintOnlyIfDetail([Boolean]) Method
Version: Available or changed with runtime version 1.0.
Gets or sets the current settings of the PrintOnlyIfDetail property.
Note
From runtime version 10.1 and onward, this method is supported in Business Central online.
Syntax
[IsPrintOnlyIfDetail := ] Report.PrintOnlyIfDetail([SetPrintOnlyIfDetail: Boolean])
Note
This method can be invoked using property access syntax.
Parameters
Report
Type: Report
An instance of the Report data type.
[Optional] SetPrintOnlyIfDetail
Type: Boolean
The new setting of PrintOnlyIfDetail property.
Return Value
[Optional] IsPrintOnlyIfDetail
Type: Boolean
The current settings of the PrintOnlyIfDetail property.
Example 1
The following example is from the OnAfterGetRecord trigger of a report. If the PrintOnlyIfDetail property is true and if a GLEntryPage record exists, given the current filters, then the PageGroupNo is incremented.
var
GLEntryPage: Record "G/L Entry";
PageGroupNo: Integer;
begin
if CurrReport.PrintONLYifDETAIL and GLEntryPage.Find('-') then
PageGroupNo := PageGroupNo + 1;
end;
Example 2
The following example sets the value of the PrintOnlyIfDetail Property to true. It requires that you create a Report variable named Report111. The Subtype of the variable is report 111, Customer - Top 10 List.
IsPrintOnlyIfDetail := Report111.PrintONLYifDETAIL(true);