Skip to main content

Notifications

Announcements

No record found.

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 355
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
  • Manuel Lozada Profile Picture
    Manuel Lozada 355 on at
    How to print report with descending order?
    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 
  • Suggested answer
    Saurav.Dhyani Profile Picture
    Saurav.Dhyani 14,300 Super User 2025 Season 1 on at
    How to print report with descending order?
    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
  • Suggested answer
    YUN ZHU Profile Picture
    YUN ZHU 77,925 Super User 2025 Season 1 on at
    How to print report with descending order?
    Hi, try the following?
     
    Hope this helps.
    Thanks.
    ZHU
  • Suggested answer
    T.yahya Profile Picture
    T.yahya 114 on at
    How to print report with descending order?
    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
     
  • gdrenteria Profile Picture
    gdrenteria 14,483 Most Valuable Professional on at

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

Announcing Our 2025 Season 1 Super Users!

A new season of Super Users has arrived, and we are so grateful for the daily…

Vahid Ghafarpour – Community Spotlight

We are excited to recognize Vahid Ghafarpour as our February 2025 Community…

Tip: Become a User Group leader!

Join the ranks of valued community UG leaders

Leaderboard

#1
André Arnaud de Calavon Profile Picture

André Arnaud de Cal... 292,494 Super User 2025 Season 1

#2
Martin Dráb Profile Picture

Martin Dráb 231,307 Most Valuable Professional

#3
nmaenpaa Profile Picture

nmaenpaa 101,156

Leaderboard

Featured topics

Product updates

Dynamics 365 release plans