1
votes

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?

2

2 Answers

0
votes

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.

0
votes

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.