AXForum  
Вернуться   AXForum > Microsoft Dynamics AX > DAX Blogs
DAX
Забыли пароль?
Зарегистрироваться Правила Справка Пользователи Сообщения за день Поиск

 
 
Опции темы Поиск в этой теме Опции просмотра
Старый 19.06.2014, 05:11   #1  
Blog bot is offline
Blog bot
Участник
 
25,643 / 848 (80) +++++++
Регистрация: 28.10.2006
How to count query loops number
Источник: http://alexvoy.blogspot.com/2014/06/...ps-number.html
==============

<div dir="ltr" style="text-align: left;" trbidi="on">Amongst our other mundane chores, counting of a query loops is not the trickiest one but, unfortunately, still clumsy developed even in AX 2012.

Not only is it strange to have two different methods for one only and multiple data sources, but it takes long time and returns incorrect results when it comes to groupings.

SysQuery::countTotal and SysQuery::countLoops use the private method SysQuery::countPrim, which can be redone in a way suggested here (in Russian).

private server static container сountPrim(container _queryPack)
{
Query countQuery;
QueryRun countQueryRun;
QueryBuildDataSource qbds;
QueryBuildFieldList qbfl;
Common common;
Integer counter;
Integer loops;

Integer tmxGroupNumber;
Integer tmxDataSourceNumber;
;
countQueryRun = new QueryRun(_queryPack);
countQuery = countQueryRun.query();
tmxGroupNumber = countQuery.groupByFieldCount(); <span class="rem">//
__________________
Расскажите о новых и интересных блогах по Microsoft Dynamics, напишите личное сообщение администратору.
 

Похожие темы
Тема Автор Раздел Ответов Посл. сообщение
atinkerersnotebook: Walkthrough & Tutorial Summary Blog bot DAX Blogs 1 09.09.2013 09:11
ax-erp: How to Set the Query Range on a SSRS Report Blog bot DAX Blogs 0 18.10.2012 19:11
dax-lessons: How to get the count of number of pages printed on to SSRS report [AX 2012 , X++] Blog bot DAX Blogs 0 16.08.2012 21:12
axaptapedia: How to count records in a Query Blog bot DAX Blogs 1 27.08.2008 00:38

Ваши права в разделе
Вы не можете создавать новые темы
Вы не можете отвечать в темах
Вы не можете прикреплять вложения
Вы не можете редактировать свои сообщения

BB коды Вкл.
Смайлы Вкл.
[IMG] код Вкл.
HTML код Выкл.
Быстрый переход

Рейтинг@Mail.ru
Часовой пояс GMT +3, время: 09:58.