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

 
 
Опции темы Поиск в этой теме Опции просмотра
Старый 04.03.2019, 04:45   #1  
Blog bot is offline
Blog bot
Участник
 
25,459 / 846 (79) +++++++
Регистрация: 28.10.2006
alirazazaidi: Paging in Query X++ Dynamics 365 for finance and operations
Источник: https://www.tech.alirazazaidi.com/pa...nd-operations/
==============

For paging in X++ Query. There are three steps required. Rest of Query Code is same.

We have to set following things in Query data source
  • Set Sort field in Query data Source.
  • Paging position property of QueryRun is set to true.
  • Add page range with starting position and number of records in QueryRun
Here is code snippet


  QueryBuildRange qbr,qbrStartDate,qbrEndDate;
QueryBuildDataSource qbd;
IAPageSize EnumPageSize;

QueryRun        qr;

Query           query = new Query();

Int pageSize = 2;



qbd = query.addDataSource(TableNum(ProjPlanVersion));
qbd.addOrderByField(fieldNum(ProjPlanVersion,HierarchyId));

qr = new QueryRun(query);

qr.enablePositionPaging(true);
            CurrentPageNumber =1;
            startingposition = CurrentPageNumber * pagesize;
            qr.addPageRange(startingposition, totalRows);
while(qr.next())



{



Info (“”);

}

Источник: https://www.tech.alirazazaidi.com/pa...nd-operations/
__________________
Расскажите о новых и интересных блогах по Microsoft Dynamics, напишите личное сообщение администратору.
 

Похожие темы
Тема Автор Раздел Ответов Посл. сообщение
alirazazaidi: Report menu item is not found when constructing the query string” Dynamics 365 for finance and operations. Blog bot DAX Blogs 0 04.02.2019 01:49
alirazazaidi: Build Dynamics Query in Dynamics 365 for Finance and Operations – Video Webcast MsDyn365FO Blog bot DAX Blogs 0 11.10.2018 08:12
survivingcrm: What’s An “App” in Dynamics 365 Anyway? Blog bot Dynamics CRM: Blogs 0 06.01.2018 22:14
jaestevan: Microsoft Dynamics 365 for Operations Blog bot DAX Blogs 0 02.11.2016 01:11
Platform updates overview - 3.70.B - NAV2009 R2 Blog bot Dynamics CRM: Blogs 0 07.02.2011 22:06
Опции темы Поиск в этой теме
Поиск в этой теме:

Расширенный поиск
Опции просмотра

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

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

Рейтинг@Mail.ru
Часовой пояс GMT +3, время: 00:24.
Powered by vBulletin® v3.8.5. Перевод: zCarot
Контактная информация, Реклама.