When you work with data sources through a query in EP/SSRS you might land up in this error “Data or calculated fields with type “Record” are not supported”.
How do i resolve ?
One of the tables that is being used in the data source has a display method with a return type as “record”. Scan through all the display methods and find the one that has the display keyword but still returns a type record in the signature. In our case we had a method similar to this
Public display inventTable getInventTable() { return InventTable::find(this.itemid); }
Why does this happen ?
It is illegal to use a display keyword for a method that returns any complex object like “Container”, “Record”, “Class”. The reason we don’t find it inside AX is because compiler doesn’t validate it and it can be deducted only at run time. So say you have you a display method as in the example above but you never use it then AX never complains about it.
When these tables are accessed through Query in SSRS, SSRS tries to run through the list of display methods to show up in the field selection. Since SSRS cannot comprehend the return type it throws this error.
For more tips and learning about SSRS – AX 2012 order the book Dynamics AX 2012 Reporting Cookbook authored by me.
Related articles
- SSRS Tip: Speed up RDP based SSRS reports testing in Dynamics Ax 2012
- SSRS tip: No row message in Dynamics Ax SSRS 2012
- SSRS Tip: Using invisible parameters in contracts – Dynamics AX 2012
- SSRS tip: Take care that VS and AX client are in the same layer for SSRS – Dynamics AX 2012
- Dynamics Ax 2012 reporting cookbook for SSRS – Dynamics Ax 2012
The post Error: SSRS/EP error when the return type in display method is incorrect – Dynamics AX 2012 appeared first on Dynamics Ax Lounge.
转载请注明:ww12345678 的部落格 | AX Helper » Error: SSRS/EP error when the return type in display method is incorrect – Dynamics AX 2012