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

 
 
Опции темы Поиск в этой теме Опции просмотра
Старый 17.03.2010, 15:40   #1  
Blog bot is offline
Blog bot
Участник
 
25,475 / 846 (79) +++++++
Регистрация: 28.10.2006
In our Classic reports we have the possibility to use Transfooter and Transheader. A typical use for classic Transfooters and Transheaders are to show a current subtotals up to the end of the current page or sums per page

These functions are not directly mapped from Classic reports to RDLC reports in Dynamics NAV 2009, but in this post I will go through how this is done in RDLC reports:


1. Create new report blank report with table 18



2. Create DataItem ”Customer”



3. Go to Section Designer and add the following fields:

· No.

· Name

· Debit Amount



4. Save the report as ID 50000 – Transfooter / Transheader



5. Now go to Visual Studio (View / Layout)



6. Create table and add the fields No, Name and Debit Amount



7. Give this table the name “MainTable”



8. Now we have added the basic for this report. But I would also like to have a Grand total of the Debit Amount so I add this as well. I add this in the Footer of the table

="GrandTotal: " & sum(Fields!Customer__Debit_Amount_.Value)



9. Now if my report is printed I get a list of my all my customer with Debit Amount displayed and with GrandTotal in the end of the report:



10. Now I would like to see the accumulated sum of the Debit Amount on each the page footers, and on the next page display this accumulated sum from previous page. So I will add Transfooter and Transheader functionality to the report.

11. First we need to do some intermediate calculations to accomplish this.

Add 3 new columns to the existing table in Visual Studio;



12. In the first column enter this expression:

=RunningValue(Fields!Customer__Debit_Amount_.Value, Sum, "MainTable")

And give this name “Subtotals1”



13. In the Second column enter this expression:

=RunningValue(Fields!Customer__Debit_Amount_.Value, Sum, "MainTable") - Fields!Customer__Debit_Amount_.Value

And give this name “Subtotals2”



14. In the Third column enter this expression:

=RunningValue(Fields!Customer__No__.Value, Count, "MainTable")

And give this name “SubCount”



The 3 columns should now look like this:



15. As these 3 columns are only used for calculation I will make them really small and set Visibility “Hidden=True” and make the font red so I remember that these columns are hidden.

Your report should now look like this:



16. Ok, it’s now time to add a Transfooter and Transheader. Enable Page Header and Page Footer in the report. You report should look like this:



17. In the Page Footer I place a text box with the following expression:

="Transfooter subtotal = " & Last(ReportItems!Subtotals1.Value)

And then I set BackgroundColor, and Color just so this Transfooter stands out in my report, and right align text:





18. In the Page header I place a text box with the following expression:

="Transheader subtotal = " & (First(ReportItems!Subtotals2.Value))

And then I set BackgroundColor, and Color just so this Transfooter stands out in my report, and right align text:





19. Now I’m almost done but I would like to not see the Transheader on the first page and not to see the Transfooter on the last page, so I select properties on the Page Header and set the “PrintOnFirstPage=False”



20. Now I could do the same on Page Footer, but maybe I would like to display the Page Footer, but not with the Transfooter displayed, so here is a little trick for how to do this.

21. Insert a text box below the table and set the expression to “=True”, Name=LastPageControl, Hidden=True and color red.



22. With this field added after the table we can now check to see when we are on the last page.

So I add the following Visibility Expression on the Transfooter textbox:

=ReportItems!LastPageControl.Value



23. Now I’m done, I save, import into NAV and compile. After some fit and finish on the report it now looks like this when I print:





You can download my report here as FOB and XPS.

Thanks,
Claus Lundstrøm, Program Manager, Microsoft Dynamics NAV



Источник: http://feedproxy.google.com/~r/Micro...s-reports.aspx
__________________
Расскажите о новых и интересных блогах по Microsoft Dynamics, напишите личное сообщение администратору.
 

Опции темы Поиск в этой теме
Поиск в этой теме:

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

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

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

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