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

 
 
Опции темы Поиск в этой теме Опции просмотра
Старый 12.03.2013, 23:12   #1  
Blog bot is offline
Blog bot
Участник
 
25,475 / 846 (79) +++++++
Регистрация: 28.10.2006
emeadaxsupport: Grand total row on report in AX 2012 – “how to” instruction
Источник: http://blogs.msdn.com/b/axsupport/ar...struction.aspx
==============

Everyone who knows AX 2009 or previous versions, is aware of very useful feature - > Print options. It was available almost on every x++ report.

User was able to add totals/ subtotals and grand totals by simple “clicking”.

With SSRS Reporting Services this option is not available anymore and the only way to achieve the same results is possible by programming under Visual Studio.

This article will show you how to add grand total on the report. At first it looks difficult for people who do not have programming skills, but I’m a Functional Engineer as well and I could do it myself.

In addition, if you see that Subtotals or Grand total is not available on very important report, I recommend to log a Product Suggestion on MS Connect Site for each report. This will help to track all this requirements by Product team.

And I kindly ask You to vote for on the existing one:


or


More information about MS Connect site available in previous blog post.

Example:

Ledger Transaction list report


1. Open Visual Studio > Application Explorer > SSRS Reports > Reports > LedgerTransListAccount > right click > edit


2. Add Parameter > Parameter > name: GrandTotal


3. Change properties as follow:
- DataType: boolean
- Name: GrandTotal
- Prompt String: @SYS179500 (Grand total)

Effect > Grand total parameter is available:



4. Back to Visual Studio > Expand the LedgerTransListAccount > Designs > report > right click > Edit Using Designer


5. The Design View will open > right click on the left side of window and insert row > outside group - below


6. On the added row (left side of window) > right click and select the command > row visibility


7. Select > Show or hide based on expression and add expression as follow:
= iif(Parameters!GrandTotal.value = true, false, true)


Click Ok and close the row visibility form.
8. Add the Line label > right click on first column > expression


9. Add expression as follow:
=Labels!@SYS179500


10. Under the column Amount in accounting currency Debit -> right click and select Expression


11. Add expression:
=Microsoft.Dynamics.Framework.Reports.BuiltInMethods.ToDisplayStringAmount(
Parameters!AX_RenderingCulture.Value,
Sum(Fields!AccountingCurrencyAmountDebit.Value),
True)


12. Repeat step 6 on the next field (Amount in accounting currency Credit) and add expression:
=Microsoft.Dynamics.Framework.Reports.BuiltInMethods.ToDisplayStringAmount(
Parameters!AX_RenderingCulture.Value,
Sum(Fields!AccountingCurrencyAmountCredit.Value),
True)


13. On the Solution Explorer select ReportModel > right click > deploy


14. Close Visual Studio after deployment, restart AOS and check the results:


Additional notes, if user would like to see grand total for net difference – You have to follow the same steps, but the expression is different in point 11 and 12:
Design: new row added as in previous steps

Expression 11:
=Microsoft.Dynamics.Framework.Reports.BuiltInMethods.ToDisplayStringAmount(
Parameters!AX_RenderingCulture.Value,
Iif((Sum(Fields!AccountingCurrencyAmountDebit.Value)) - Abs(Sum(Fields!AccountingCurrencyAmountCredit.Value)) > 0,
Sum(Fields!AccountingCurrencyAmountDebit.Value) - Sum(Fields!AccountingCurrencyAmountCredit.Value),
Cdbl(0)),
False)


Expression 12:
=Microsoft.Dynamics.Framework.Reports.BuiltInMethods.ToDisplayStringAmount(
Parameters!AX_RenderingCulture.Value,
Iif((Sum(Fields!AccountingCurrencyAmountDebit.Value) - Sum(Fields!AccountingCurrencyAmountCredit.Value))
__________________
Расскажите о новых и интересных блогах по Microsoft Dynamics, напишите личное сообщение администратору.
 

Похожие темы
Тема Автор Раздел Ответов Посл. сообщение
amer-ax: It was a great day! Blog bot DAX Blogs 3 29.12.2012 01:02
DAX: Official Dynamics AX 2012 R2 Content (update) - Where is it, and how can you find out about updates? Blog bot DAX Blogs 0 03.12.2012 11:11
ax-erp: Creating SSRS-Reports in Dynamics AX 2012 – What’s no longer possible in AX-reports Blog bot DAX Blogs 0 18.07.2012 12:11
emeadaxsupport: New Content for Microsoft Dynamics AX 2012 : October 2011 Blog bot DAX Blogs 0 27.10.2011 17:11
daxdilip: Whats New in Dynamics AX 2012 (A brief extract from the recently held Tech Conf.) Blog bot DAX Blogs 7 31.01.2011 12:35

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

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

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