How to group by a table display method in a report?

心不动则不痛 提交于 2019-12-11 09:19:43

问题


I have a table CustInvoiceJour. I use report to print some info by grouping some fields (Sales Price, SalesUnit in the report Query. Report prints sum(LineDisc), sum(LineAmount) values.

I want to modify report adding one more group by field - but that field is display method. Axapta 3.0 only supports physical fields to group by.

What is the fastest possible way to do that?


回答1:


Sorry, but Axapta 3.0 does not support grouping by a display method and nor do any other version of AX.

AX 2012 support adding a computed field to a view, which would save your day in that version.

In all other version you will have to have a real field, then compute the field on insert or update. For the CustInvoiceJour table you only need to change the insert method, as the table is never updated.




回答2:


Version 1: You can use Map class (Types::Container, Types::Container)to group data manually and MapItertor to send them to report.

Version 2: You can insert your data to temporary table and use 'select ... groupby' from this table to send data to the report.



来源:https://stackoverflow.com/questions/13292409/how-to-group-by-a-table-display-method-in-a-report

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!