03.06.2011, 14:53 | #1 |
Участник
|
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:
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:
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:
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:
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, напишите личное сообщение администратору. |
|