Skip to main content

Notifications

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;
}
  • Verified answer
    KasparsSemjonovs Profile Picture
    4,177 Super User 2025 Season 1 on at
    Custom Report Not Available in Search
    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.
  • Suggested answer
    YUN ZHU Profile Picture
    81,534 Super User 2025 Season 1 on at
    Custom Report Not Available in Search
    Hi, a simple example, I hope it can give you some tips.
     
    Thanks.
    ZHU
     
  • gdrenteria Profile Picture
    17,557 Most Valuable Professional on at
    Custom Report Not Available in Search
    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

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

🌸 Community Spring Festival 2025 Challenge 🌸

WIN Power Platform Community Conference 2025 tickets!

Jonas ”Jones” Melgaard – Community Spotlight

We are honored to recognize Jonas "Jones" Melgaard as our April 2025…

Kudos to the March Top 10 Community Stars!

Thanks for all your good work in the Community!

Leaderboard

#1
André Arnaud de Calavon Profile Picture

André Arnaud de Cal... 294,161 Super User 2025 Season 1

#2
Martin Dráb Profile Picture

Martin Dráb 232,942 Most Valuable Professional

#3
nmaenpaa Profile Picture

nmaenpaa 101,158 Moderator

Leaderboard

Featured topics

Product updates

Dynamics 365 release plans