{"title":"Report.PrintOnlyIfDetail([Boolean]) Method","url":"https://jonas-paprotka.de/docs/dev-itpro/developer/methods-auto/report/reportinstance-printonlyifdetail-method/","by":"JOP-AL","license":"Copyright (c) Microsoft Corporation. CC BY 4.0, https://creativecommons.org/licenses/by/4.0/; code samples MIT. From https://learn.microsoft.com/en-us/dynamics365/business-central/dev-itpro/developer/methods-auto/report/reportinstance-printonlyifdetail-method, MicrosoftDocs/dynamics365smb-devitpro-pb at 828b6ee (2026-11-19). Changed: includes filled in, links to this site, and for agents shortened without dropping a fact.","credit":"Microsoft Corporation, CC BY 4.0","origin":"https://learn.microsoft.com/en-us/dynamics365/business-central/dev-itpro/developer/methods-auto/report/reportinstance-printonlyifdetail-method","source":{"name":"Business Central developer and IT pro docs","repo":"https://github.com/MicrosoftDocs/dynamics365smb-devitpro-pb","commit":"828b6ee72fcd75755627cd6011f3d20899217ab2","date":"2026-11-19"},"checked":"2026-11-19","description":"Gets or sets the current settings of the PrintOnlyIfDetail property.","date":"2026-10-01","meta":{"topic":"reference"},"outline":[{"level":1,"title":"Report.PrintOnlyIfDetail([Boolean]) Method","slug":"reportprintonlyifdetailboolean-method","at":0,"chars":1659},{"level":2,"title":"Syntax","slug":"syntax","at":274,"chars":171},{"level":2,"title":"Parameters","slug":"parameters","at":445,"chars":207},{"level":2,"title":"Return Value","slug":"return-value","at":652,"chars":140},{"level":2,"title":"Example 1","slug":"example-1","at":792,"chars":420},{"level":2,"title":"Example 2","slug":"example-2","at":1212,"chars":313},{"level":2,"title":"Related information","slug":"related-information","at":1525,"chars":134}],"text":"# Report.PrintOnlyIfDetail([Boolean]) Method\n> Version: _Available or changed with runtime version 1.0._\nGets or sets the current settings of the PrintOnlyIfDetail property.\n> NOTE\n> From runtime version 10.1 and onward, this method is supported in Business Central online.\n## Syntax\n```al\n[IsPrintOnlyIfDetail := ]  Report.PrintOnlyIfDetail([SetPrintOnlyIfDetail: Boolean])\n```\n> NOTE\n> This method can be invoked using property access syntax.\n## Parameters\nReport\nType: report-data-type\nAn instance of the report-data-type data type.\n*[Optional] SetPrintOnlyIfDetail*\nType: ../boolean/boolean-data-type\nThe new setting of PrintOnlyIfDetail property.\n## Return Value\n*[Optional] IsPrintOnlyIfDetail*\nType: ../boolean/boolean-data-type\nThe current settings of the PrintOnlyIfDetail property.\n## Example 1\nThe 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.\n```al\nvar\n    GLEntryPage: Record \"G/L Entry\";\n    PageGroupNo: Integer;\nbegin\n    if CurrReport.PrintONLYifDETAIL and GLEntryPage.Find('-') then\n      PageGroupNo := PageGroupNo + 1;\nend;\n```\n## Example 2\nThe following example sets the value of the ../../properties/devenv-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.\n```\nIsPrintOnlyIfDetail := Report111.PrintONLYifDETAIL(true);\n```\n## Related information\nreport-data-type\nGet Started with AL<../../devenv-get-started>\nDeveloping Extensions<../../devenv-dev-overview>"}