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...
Answered

Custom Report Not Available in Search

(1) ShareShare
ReportReport
Posted on by 10
Hello, I just started coding with AL for Business Central. I am trying to make a simple report that references the Sales Header and provides me with Order Intake based off of the SystemCreatedAt date and time. I got my code to the point where there are no syntax errors and it has published successfully. I am having an issue with after the code is published, it is not showing up in the search bar in business central. From my understanding, all you need to define for the report to show up is 'UsageCategory' which I have set to 'ReportsAndAnalysis'. Can someone please let me know if I am missing something in my code or if something just seems completely wrong?
 
// Order Intake Report Page
report 50100 /Order Intake/
{
    // The usage category makes the report available in the search
    UsageCategory = ReportsAndAnalysis;
 
    // This is where we define the layout of the report
 
    RDLCLayout = './ReportLayout.rdlc';
    dataset
    {
        // DataItem to hold Sales Header data
        dataitem(SalesHeader; /Sales Header/)
        {
            // Filter to only include Sales Orders
            DataItemTableView = SORTING(/Document Type/) WHERE(/Document Type/ = CONST(Order));
 
            // Columns to display in the report
            column(DocumentNo; /No./)
            {
                IncludeCaption = true;
            }
            column(SellToCustomerName; /Sell-to Customer Name/)
            {
                IncludeCaption = true;
            }
            column(SellToCustomerNo; /Sell-to Customer No./)
            {
                IncludeCaption = true;
            }
            column(TotalAmount; /Amount Including VAT/)
            {
                IncludeCaption = true;
            }
            column(CreatedAt; /SystemCreatedAt/)
            {
                IncludeCaption = true;
            }
        }
    }
    // Request page for the report, allowing the user to filter by the Created At date
    requestpage
    {
        layout
        {
            area(content)
            {
                group(GroupName)
                {
                    field(DateFilterFrom; DateFilterFrom)
                    {
                        ApplicationArea = All;
                        Caption = 'Created Date From';
                        ToolTip = 'Enter the start date to filter the Sales Orders.';
                    }
                    field(DateFilterTo; DateFilterTo)
                    {
                        ApplicationArea = All;
                        Caption = 'Created Date To';
                        ToolTip = 'Enter the end date to filter the Sales Orders.';
                    }
                }
            }
        }
    }
 
    trigger OnPreReport()
    begin
        // Apply the date filter before the report is generated
        if DateFilterFrom <> 0DT then
            SalesHeader.SetRange(/SystemCreatedAt/, DateFilterFrom, DateFilterTo);
    end;
 
    var
        DateFilterFrom: DateTime;
        DateFilterTo: DateTime;
}
I have the same question (0)
  • Gerardo Rentería García Profile Picture
    27,054 Most Valuable Professional on at
    Hi there, 
    This may help, 
    https://learn.microsoft.com/en-us/dynamics365/business-central/dev-itpro/developer/devenv-al-menusuite-functionality
    You have to consider as you indicate the UsageCategory property, but you could also experience some problem because of the ApplicationArea property, or AccessByPermission. 
    best regards
    Gerardo
  • Suggested answer
    YUN ZHU Profile Picture
    101,995 Super User 2026 Season 1 on at
    Hi, a simple example, I hope it can give you some tips.
     
    Thanks.
    ZHU
     
  • Verified answer
    KasparsSemjonovs Profile Picture
    4,840 Super User 2026 Season 1 on at
    As can be seen in Yun Zhus post - the ApplicationArea property is missing in Your code. And Caption is usually required as well.
     
    If You are on-Prem, You would need also to recheck if the report 50100 is assigned to Your license.
     
    and last action - if You are not using a SUPER user, re-check that the user has the report 50100 in his permissions.

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