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

 
 
Опции темы Поиск в этой теме Опции просмотра
Старый 06.05.2014, 15:11   #1  
Blog bot is offline
Blog bot
Участник
 
25,477 / 846 (79) +++++++
Регистрация: 28.10.2006
vasantharivali: Add Query Range for Same Table with Different DataSources
Источник: http://vasantharivali.wordpress.com/...t-datasources/
==============

Hi Friends,

Here I have posted the code(not entire job/program) for adding multiple ranges/relations with the same table using Query object

Code Starts Here:

QueryRun qr;

//1st DataSource

QueryBuildDataSource qbdTableSourcefromQuery; // get query from the AOT Query which used by System in SysQuery()
QueryBuildDataSource qbdTableSourcefromCode; // newly added Query for Account Number Range

qr = new QueryRun(“your Query”);

qbdCustTableSourcefromQuery = SysQuery::findOrCreateDataSource(qr.query(), tableNum(TableName1));

SysQuery::findOrCreateRange(qbdCustTableSourcefromQuery, fieldNum(TableName1, FieldName)).value(“QueryValue”);

//2nd DataSource

qbdCustTableSourcefromCode = qbdCustTableSourcefromQuery.addDataSource(tableNum(TableName1), “TableNameNew”);
qbdCustTableSourcefromCode.relations(true);
qbdCustTableSourcefromCode.joinMode(JoinMode::ExistsJoin);
qbdCustTableSourcefromCode.addRange(fieldNum(TableName1, FieldName)).value(queryValue(“QueryValue”));

 

// Vasanth Arivali




Источник: http://vasantharivali.wordpress.com/...t-datasources/
__________________
Расскажите о новых и интересных блогах по Microsoft Dynamics, напишите личное сообщение администратору.
 

Похожие темы
Тема Автор Раздел Ответов Посл. сообщение
atinkerersnotebook: Using the Dynamics AX Excel Add-In Blog bot DAX Blogs 1 25.09.2013 07:11
emeadaxsupport: Dynamics AX 2012 Reporting: How to add company logo into query based report Blog bot DAX Blogs 0 06.12.2012 21:11
vasantharivali: Dynamic Query Using Aggregative Functions and Joins Blog bot DAX Blogs 0 17.11.2012 11:12
ax-erp: How to Set the Query Range on a SSRS Report Blog bot DAX Blogs 0 18.10.2012 19:11

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

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

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