В Axapta Application Development Best Practices говорится:
"Create queries in the tree where possible, instead of building it all in code.
In other situations - use a select statement. Select statements are often easier to read, and they are much more compile time stable. "
Ваш код, нагалядный пример того, что QueryRun плохо воспринимается не привычным взглядом. Обратите внимание, в каком порядке у вас связываются DataSource и сравните с запросом. Попробуйте реализовать этот-же запрос в Query дизайнере, многое прояснится.
__________________
Isn't it nice when things just work?
|