web
You’re offline. This is a read only version of the page.
close
Skip to main content

Announcements

News and Announcements icon
Community site session details

Community site session details

Session Id :
Small and medium business | Business Central, N...
Suggested Answer

Can we change the default options or filters on the request page of the Purchase Order report?

(2) ShareShare
ReportReport
Posted on by 124
Hi,I’m trying to set a variable ArchiveDocument to false by default using the following code:
 
requestpage
{
    trigger OnOpenPage()
    var
    begin
        ArchiveDocument := false;
    end;
}

I’m trying to extend the Standard Sales - Order Conf. report using the following code, and it works as expected

reportextension 50112 ZYStandardSalesOrderConfExt extends "Standard Sales - Order Conf."
{
requestpage
{
trigger OnOpenPage()
begin
LogInteraction := false;
ArchiveDocument := false;
DisplayAssemblyInformation := false;
end;
}
}

However, I’m facing issues when trying to achieve similar behavior with the Purchase Order report, as the variables (like ArchiveDocument) are global and causing errors. Is there a way to achieve this functionality in the Purchase Order report without encountering errors due to global variables? Any suggestions on how to handle these variables properly in a requestpage would be greatly appreciated!

 
    trigger OnPreReport()
    begin
        ArchiveDocument := false;
    end;
'ArchiveDocument' is inaccessible due to its protection levelALAL0161
 
I have the same question (0)
  • Suggested answer
    Sagar Dangar, MCP Profile Picture
    813 Moderator on at
    Hi,
     
    Use OnpreReport Trigger and check. Try below code
     
    trigger OnPreReport()
        var
            myInt: Integer;
        begin
            ArchiveDocument := false;
        end;
  • Suggested answer
    Ramesh Kumar Profile Picture
    7,561 Super User 2026 Season 1 on at
    Use RequestPage.Layout & RequestPage.Actions instead of variables options as they already present in the base report or Clone the report as a custom version.
     
    report 50113 MyPurchaseOrderReport extends "Purchase - Order"
     
     
    Thanks
    Ramesh
     
    If this was helpful, please check the "Does this answer your question?" box and mark it as verified.
  • Suggested answer
    YUN ZHU Profile Picture
    101,995 Super User 2026 Season 1 on at
    Hi, hope the following can give you some hints.
    Dynamics 365 Business Central: Can we change default options/filters on the request page of Report???
     
    Thanks.
    ZHU

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

Season of Sharing Community Challenge Launch!

Jump in, show your community spirit, and win prizes!

Women in Power Builds Momentum

Expanding mentorship, skilling, and AI innovation

Congratulations to the May Top 10 Community Leaders

These are the community rock stars!

Leaderboard > Small and medium business | Business Central, NAV, RMS

#1
OussamaSabbouh Profile Picture

OussamaSabbouh 2,371 Super User 2026 Season 1

#2
YUN ZHU Profile Picture

YUN ZHU 1,806 Super User 2026 Season 1

#3
AndrewThomas81 Profile Picture

AndrewThomas81 1,371

Last 30 days Overall leaderboard

Featured topics

Microsoft Training Manuals

Product updates

Dynamics 365 release plans