Источник:
http://palleagermark.blogspot.com/20...lds-on-vs.html
==============
One thing I feel is missing from the documentation for AX Visual Studio reports is a simple explanation or demo of how to create an od school display field in a report.
I could figure out that a DataMethod was needed but it took me some time to figure out how connect the method with a field on the report and how to pass parameters to the DataMethod.
You add a datamethod like this:
...
[DataMethod(), AxSessionPermission(SecurityAction.Assert]
public static string DataMethod1(string itemId)
{
string demoString = '(' + itemId + ')';
return demoString;
}
Then add a field to your design, and in the Expression editor for the field add the code to call your datamethod:
=DataMethod1(Fields!ItemId.Value)
Источник:
http://palleagermark.blogspot.com/20...lds-on-vs.html