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

Announcements

No record found.

News and Announcements icon
Community site session details

Community site session details

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

How to print report with descending order?

(1) ShareShare
ReportReport
Posted on by 373
Hi Community,
 
Do you know how I can print a report in descending order, in this case, opportunities no.?
 
this is my report extension:
 
If you know how, i will appreciate.
 
Thanks
I have the same question (0)
  • Gerardo Rentería García Profile Picture
    26,790 Most Valuable Professional on at
  • Suggested answer
    Touil Yahya Profile Picture
    220 on at
    Hi,
     
    Give this a shot:
     
    reportextension 50101 OpportunitiesRSMReport extends "Salesperson - Opportunities"
    {
        dataset
        {
    
            add(Opportunity)
            {
                // add a new field to the dataset
                column(DateClosed; Opportunity."Date Closed") { }
            }
    
        }
    
        trigger OnPreReport()
        begin
            /* This will run after the original report's equivalent trigger */
            Opportunity.SetCurrentKey(Opportunity."No.");
            Opportunity.SetAscending("No.", false);       
        end;
    
    }
     
    Hope this will help.
     
    Best regards,
    Touil Yahya
     
  • Suggested answer
    YUN ZHU Profile Picture
    101,018 Super User 2026 Season 1 on at
    Hi, try the following?
     
    Hope this helps.
    Thanks.
    ZHU
  • Suggested answer
    Saurav.Dhyani Profile Picture
    14,419 User Group Leader on at
    Hi,
     
    You should get an idea from this video - https://youtu.be/y6ZTfDVM78A?si=LaBYJKgTkin6MBsv.
     
    This video explains how you can dynamically group your data in a report based on user choice.
     
    With business central, now you can also add additional layout to a report where you can make changes and using report extension you can just add a field and option in Request page for user to choose.
     
    If you still have question, please let me know.
     
    Regards,
    Saurav Dhyani
  • Manuel Lozada Profile Picture
    373 on at
    Hi Community,
     
    Thank you for reply my question, I tried with your suggested code, but still I cannot print my report in descending order, If you have another idea I would appreciate it.
     
    Thank you 

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

Introducing the 2026 Season 1 community Super Users

Congratulations to our 2026 Super Stars!

Meet the Microsoft Dynamics 365 Contact Center Champions

We are thrilled to have these Champions in our Community!

Congratulations to the April 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,029 Super User 2026 Season 1

#2
YUN ZHU Profile Picture

YUN ZHU 1,226 Super User 2026 Season 1

#3
AndrewThomas81 Profile Picture

AndrewThomas81 1,201

Last 30 days Overall leaderboard

Featured topics

Product updates

Dynamics 365 release plans