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

 
 
Опции темы Поиск в этой теме Опции просмотра
Старый 03.06.2011, 14:53   #1  
Blog bot is offline
Blog bot
Участник
 
25,475 / 846 (79) +++++++
Регистрация: 28.10.2006


Based on feedback from these previous posts:

3D charts. Chart Generator tool II

NAV 2009 - How to generate charts / KPIs

Here is a version of the tool for RTC (with pages). In fact, this time I removed the forms. There is nothing special added to the tool compared to last time, except for the pages, so if you do want to still run it in the Classic Client, then you can get the forms from the previous version.



But first a few general things about Charts.


What Charts?
This post concerns the charts that live in table 2000000078 "Chart" (Departments/Administration/Application Setup/RoleTailored Client/Charts" (page 9182)). These charts can be added as a system part to a role center or via "Customize this page".




What other charts exist?
Other charts are not the topic for this particular post. But just to explore the alternatives, more advanced charts can be created using Client Add-ins, examples of which you can find here:

More Charts
Add-ins


I'm sure there are more ways to add charts in NAV. Please feel free to add comments about other ways and also your experience with this and other types of charts.




Which charts?
So the charts we are concerned with here, are the system charts. Their characteristics are:
  • Inbuilt - no external components needed, everything is built into RTC.
  • Simple - good at showing a simple overview, but advanced BI they are not.
  • Limited - They can be based on only one table and have limited scope.
To make the most of them, use their simplicity as a strength and don't try to make them do too much.




Ideas for charts
My experience with charts is that they are easy to overcrowd and best kept simple. Trying to come up with ideas for simple charts, one only has to look at the Role Center - designed to give a role based, quick overview. Some of the features of the default Role Center are:
  • Activities - Numbers of orders, quotes, etc
  • My-Xyz - My Customers, My Items, etc
These areas are specifically designed to give a simple and personalized overview, so perfect for charts.




Activity Charts (Charts based on Cue tables)
This example shows how to make a chart to show Activities in a chart like this:





To get charts based on Cue tables:

After importing the objects attached below, start with Page 72000 "Chart Generator List". In my case I added it to Home Items under Page Actions in my default Role Center 9006 as shown here:






Then click "New" to create a new chart:





Enter ID and Name. For table, select table 9053 "Sales Cue", and for X-Axis, just select "Primary Key". The chart needs to have an X-Axis, but in this case the X-Axis information is not really important. So it should look like this:





Then we add a column (Y-Axis) for each activity type we want in the chart - in this example we have three columns:
  • Ready to Ship
  • Partially Shipped
  • Delayed
Do this by clicking the Y-Axis action, then select those three fields.

This would be enough, but if you created the chart now, then it would give you a different picture than the Activity Center. That's because the activities apply a Date Filter. If you want to apply the same filter in the chart, then just click on Filters, and set "Date Filter" = 01011900..W. This will show you all orders from 1900 until Workdate.

Once you have completed the chart, click "Generate Chart". This will create a new system chart, using the Name you typed in as ID. Or if this chart already exists, then "Generate Chart" will overwrite the existing one.

The last thing you need to do, is to add the chart to your Role Center, either via "Customize this page" from your Role Center (Charts can only be added to the Role Center, not to any other page type), or by designing your Role Center and adding a part of type Chart.




My-Charts - Chart based on My Customers
Here is the next example: Show the customers under "My Customers" plus a little additional information, for example Balance (LCY):





This chart requires a little bit of preparation in the form of table design to begin with. First: The field you want to see in the Y-Axis (in this example Balance (LCY)) has to be added to table 9150 "My Customer". In this table you can basically copy any flowfield from the Customer table. I created a new field 50.000 called "Balance (LCY)", FieldClass = FlowField, and CalcFormula = Sum("Detailed Cust. Ledg. Entry"."Amount (LCY)" WHERE (Customer No.=FIELD(Customer No.))).

Secondly we need to filter the table by User ID. In this case we cannot set the filter in the chart itself because there is no way in the charts to filter on USERID. But, this is what you can do instead: In Codeunit 1, apply a global filter. This will take effect also for charts. This is the code you would need:

Codeunit 1:


CompanyOpen()
IF GUIALLOWED THEN
LogInStart;

// == begin ===
MyCustomer.FILTERGROUP(1);
MyCustomer.SETRANGE("User ID",USERID);
MyCustomer.FILTERGROUP(0);
// == end ===



FILTERGROUP 1 is used for applying a global filter. When setting this filter in the CompanyOpen function, it will be applied to the whole session whether you run NAV from Classic or RTC.

Now, even charts will only see customers belonging to the current user.

So, finally, this is how you could create the chart in the tool:








The tool
The tool is attached just below as a txt file. It contains these objects:
  • Table 72000 Chart Generator
  • Table 72001 Chart Generator Filter
  • Table 72003 Chart Generator YAxis
  • Codeunit 72000 Chart Generator Mgt
  • Page 72000 Chart Generator List
  • Page 72001 Chart Filters
  • Page 72003 YAxis List
  • Page 72004 Chart Generator Card
I have added "DeleteMe" in front of every object ID in the txt file. So before importing it you must open the file in NotePad, then find all "DeleteMe", check that the Object ID and name is OK, and then delete "DeleteMe". Once you are OK that all the object IDs in the txt file, then import it.

Note!! When importing a txt file into NAV, it will replace existing objects without any warning.



And finally: This tool is unsupported. These postings are provided "AS IS" with no warranties and confer no rights. You assume all risk for your use.



Lars Lohndorf-Larsen

CSS EMEA





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


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

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

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