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

Notifications

Announcements

No record found.

Community site session details

Community site session details

Session Id :
Microsoft Dynamics AX (Archived)

Sort by Method on report

(0) ShareShare
ReportReport
Posted on by

Hi All,

I have a question, I have Display methods in a report, the type of method is string, by example  :

Display Str  X;

Str Status;

BOMId = BOMTable.BomId

If (ProdTable.BOMId !="")
                    {
                        Status= "Used";
                    }
                Else
                    {
                        Status = "Not Used";
                    }

Return Status;

That method as a column in my report, my question is can my report will be sort by that methods..???

Thx...

*This post is locked for comments

I have the same question (0)
  • Martin Dráb Profile Picture
    237,959 Most Valuable Professional on at

    You can run SQL queries against X++ methods, but in your case you can simply sort by BOMId.

  • Martin Dráb Profile Picture
    237,959 Most Valuable Professional on at

    Note that Crispin's answer assumes that it's an SSRS report; it's not applicable to MorphX reports.

  • Community Member Profile Picture
    on at

    Hi Martin,

    Thx for your answer before...

    I mean, I want to sort my report by Status...

    By example, the BOMId which have status Not Used in ascending...

    and for the next is BOMId Which have status Used...

    Can I do that...??

    Or I must use a table for insert BOMId and add some field for status...??

    and then that table to be my datasource ?

  • Martin Dráb Profile Picture
    237,959 Most Valuable Professional on at

    Crispin, you still may be right - AX 2009 uses both MorphX and SSRS reports and Ari still haven't told us which one he's talking about.

    Air, if you sort by BOMId in descending order, you get first records with BOMId (= Used) and then the ones without BOMId (= Not used), therefore it meets your requirements.

    Maintaining status in separate field is an option, of course, and you would need it if your logic was more complex.

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

Responsible AI policies

As AI tools become more common, we’re introducing a Responsible AI Use…

Neeraj Kumar – Community Spotlight

We are honored to recognize Neeraj Kumar as our Community Spotlight honoree for…

Leaderboard > 🔒一 Microsoft Dynamics AX (Archived)

#1
Martin Dráb Profile Picture

Martin Dráb 4 Most Valuable Professional

#1
Priya_K Profile Picture

Priya_K 4

#3
MyDynamicsNAV Profile Picture

MyDynamicsNAV 2

Last 30 days Overall leaderboard

Featured topics

Product updates

Dynamics 365 release plans