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

 
 
Опции темы Поиск в этой теме Опции просмотра
Старый 07.10.2008, 06:05   #1  
Blog bot is offline
Blog bot
Участник
 
25,617 / 848 (80) +++++++
Регистрация: 28.10.2006
Solutions Monkey: Aggregation in EP Datasets
Источник: http://blogs.msdn.com/solutions/arch...-datasets.aspx
==============
Often times, you might want to display some aggregated values in a simple grid interface in a web page. Enterprise Portal provides a simple and efficient way of doing this. Here is a sample that I created ( with help from Ahmad, Sella and others) for a partner who has similar requirements to display aggregated values in EP grid.
There are two ways to go about it. You can change the query of the dataset which has tables simply joined and change it to group by and aggregate fields through code or You can build AxQuery in AOT which has the group by and aggregate fields defined and then use this Ax Query in DataSet (Drag-n-Drop the Query to the DataSet or create a view pointing to the Query and refer this view through the table property)

First approach: Changing the query through code
1. Create a DataSet with two table ( CustTable and SalesTable) that are inner joined in AOT
2. Override the init method of CustTable and SalesTable data source and write the below code
3. Create a User control and point to the fields that are used in aggregation in the GridView and use it in the page









Second approach
(1) Create a new Query in AOT
a. Add the datasource
b. Add the Group By column
c. Add the Fields ( the group by column and the aggregated values for other fields)
(2) Create a new View in AOT
a. Set the Query property to the query created above
(3) Create a new DataSet in aOT
a. Add the datasource and set the Table property to the View created about

You could also directly drag-n-drop the Query to Data Source node of DataSet in AOT without creating a view




==============
Источник: http://blogs.msdn.com/solutions/arch...-datasets.aspx
__________________
Расскажите о новых и интересных блогах по Microsoft Dynamics, напишите личное сообщение администратору.
 

Похожие темы
Тема Автор Раздел Ответов Посл. сообщение
Solutions Monkey: Integrating EP Web Parts to non-EP SharePoint sites Blog bot DAX Blogs 0 04.04.2009 03:19
Solutions Monkey: w3wp crash while installing EP or creating EP site Blog bot DAX Blogs 0 07.02.2009 08:13
Solutions Monkey: Deploying Ax 2009 SP1 EP Blog bot DAX Blogs 0 05.02.2009 07:08
Solutions Monkey: EP SSL ( https) Setup Blog bot DAX Blogs 0 23.10.2008 12:05
Solutions Monkey: EP Deployment - Internals Blog bot DAX Blogs 0 21.10.2008 20:05

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

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

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