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 :
Microsoft Dynamics AX (Archived)

Select a display method in a "select/while select"

(0) ShareShare
ReportReport
Posted on by 37,081

Hi guys,

I am facing a performance issue here.

I have to select only two fields and a display method from a table which contains many fields (using a while select and some big "Joins". 

If I select a display method with the while select, it throws a compile-error. As a result, I am forced to select all the fields, display methods, which is severely affecting the performance of the report.

Generally an AX 2009 MorphX report is slow, and this is making the performance even worse. The report takes a long time to load. 

Could you please suggest me a helpful alternative??

 

Thanks,

Crispin

*This post is locked for comments

I have the same question (0)
  • Verified answer
    Joris dG Profile Picture
    17,782 on at

    Display methods only exist within AX. Select statements get translated and passed down to your SQL server. As a result, display methods are not available for use in a select statement.

    Assuming your display method only uses one or two fields from your table, you just select those two fields and your display method will work. If you need to filter on whatever it is your display method returns, that is nearly impossible, although it depends on what the display method is actually doing.

    I assume you're using AX 2009. In AX 2012 you could create a view with a computed column and filter on that computed column. ( daxmusings.codecrib.com/.../computed-view-columns-in-ax-2012.html )

  • Verified answer
    Søren Rasmussen - Bredana Profile Picture
    817 on at

    Agreeing with Joris.

    Could it be an idea creating a temporary table and add the data in a server based class? This could take a bit of the load of the network. I realize that it does not solve the whole performance issue but even a little improvement counts.

  • asif.sanaullah Profile Picture
    470 on at

    Yes  Crispin John,

    I am also 100% agreed with Joris dG.

    1. By using AX-Views your report performance will be improved.

    2. And if you are using AX-2012 views then you can also add computed fields in Views.

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 April Top 10 Community Leaders

These are the community rock stars!

Leaderboard > 🔒一 Microsoft Dynamics AX (Archived)

#1
CP04-islander Profile Picture

CP04-islander 21

#2
dekion Profile Picture

dekion 4

#2
Virginia99 Profile Picture

Virginia99 4

Last 30 days Overall leaderboard

Featured topics

Product updates

Dynamics 365 release plans
Liquid error: parsing "/forums/thread/details/?threadid=%27nvOpzp;%20AND%201=1%20OR%20(%3C%27%22%3EiKO))," - Too many )'s.