• Microsoft Dynamics NAV Team Blog

    Update Rollup 4 for Microsoft Dynamics NAV 2013 R2 has been released

    • 9 Comments

    Update rollup 4 includes all application and platform hotfixes and regulatory features that have been released for Microsoft Dynamics NAV 2013 R2 and includes hotfixes that apply to all countries and hotfixes specific to the following local versions:

    • AU – Australia
    • DE - Germany
    • DK - Denmark
    • FR - France
    • IT - Italy
    • NA – North America
    • NL – Netherlands
    • NZ – New Zealand
    • SE - Sweden
    • UK - United Kingdom

     

    New in update rollup 4 

    Beginning with update rollup 4, the update rollups for Microsoft Dynamics NAV 2013 R2 now also includes hotfixes for the upgrade toolkit. 

     

    Where to find update rollup 4

    You can download update rollup 4 from KB 2930617 - Update Rollup 4 for Microsoft Dynamics NAV 2013 R2 (Build 36078).

    The hotfixes that have been released since update rollup 3 are listed in KB 2930617. For a full list of all hotfixes included in the update rollup, see the following CustomerSource and PartnerSource pages: 

    CustomerSource:

    PartnerSource

     

    More Information

    For more information about update rollups for Microsoft Dynamics NAV 2013 R2, see Announcement of update rollups for Microsoft Dynamics NAV 2013 R2.

  • Microsoft Dynamics NAV Team Blog

    RDLC Report and Performance in Microsoft Dynamics NAV

    • 9 Comments

    It has been a while since I last blogged and I am taking the chance now to post on a very delicate argument. The main focus of my dissertation is about performance (Out Of Memory exception, typically) with Microsoft Dynamics NAV 2009 R2, Microsoft Dynamics NAV 2013, and Microsoft Dynamics NAV 2013 R2.

    I would encourage you to post your comments and thoughts. Have a good read.

    Microsoft Dynamics NAV 2009 R2 Considerations (RDLC 2005 - Report Viewer 2008)

    All the Microsoft Dynamics NAV 2009 stack (RTM, SP1, R2) is built and sealed for the x86 platform. This means that both client (Microsoft.Dynamics.NAV.Client.exe) and server (Microsoft.Dynamics.NAV.Server.exe) are 32bit components of the NAV platform. RDLC Reporting (Enhanced Reporting, in the recent NAV terminology) in Microsoft Dynamics NAV 2009 is made of a Report Viewer .NET Control targeted for WinForm, and Microsoft Dynamics NAV casts this control into a Microsoft Dynamics NAV modal page (that is a WinForm, roughly speaking) within the RTC boundaries.

    Report Viewer works, in principle, accepting 2 items:

    -          a metadata definition plain XML file (Report.rdlc) that define the structure of the report rendering runtime  

    -          a Dataset that is a serialized XML file that contains the data to be rendered in the way defined in the rdlc file definition

    With Microsoft Dynamics NAV 2009, Report Viewer works client-side to render the report to the user (Preview Layout rendering extension) and therefore it needs to have both RDLC definition and dataset streamed completely from the Server to the Client. This streaming process of Client memory population, since Microsoft Dynamics NAV 2009 SP1, is made with a chunking method that can be resumed in shorts as per below.

    SQL Server process and generate a complete Result Set. The Result Set is sent to the Microsoft Dynamics NAV Server as normal TCP packets informations and the Microsoft Dynamics NAV Server, meanwhile receiving these packets from SQL Server, is sending this Result Set in chunks to the client, clearing the Microsoft Dynamics NAV Server memory once the packet is received from the client. This has been introduced to avoid memory leak server side that works only as routing point for packets / chunks from SQL Server to the Microsoft Dynamics NAV Windows client. If you open task manager both in the Middle Tier machine and Client machine, meanwhile processing a Heavy report (or whatever report), you might notice that the memory footprint server side is constant and pretty low while the Client one is growing and growing in consumption until it reaches a physical limit.

    When it reaches its physical limit, you receive the typical error message like the one shown below (explicit Out Of Memory exception)

    And, most of the times, report viewer continue clearing the error message and simply display a single blank page (implicit Out Of Memory exception) or several pages with mixed random string value assignments (blurred Out of Memory exception).

    I do not want to go more deep into the technicalities that lies beneath but you have to consider the following:

    1. The Microsoft Dynamics NAV 2009 R2 Role Tailored client is a 32bit application (with a limit, on the chart, of 2GB memory per process).
    2. The Microsoft Dynamics NAV 2009 R2 Role Tailored client and report(s) share the same memory Application Domain (this means the same memory stack).
    3. Report Viewer control run in a sort of sandbox mode inside the Microsoft Dynamics NAV WinForm so that the memory consumption is even more limited (approx. 1GB).

    Based on the assumption above my studies on performance related to heavy reports have been the following:

    1. Report Viewer Preview rendering extension within Role Tailored Client is raising an Out Of Memory exception when Client process memory reaches 0.8 – 1.1 GB approx. (this differs between multiple factors like e.g. OS, Hardware type, Resources, etc.)
    2. Considering a typical Microsoft Dynamics NAV dataset (60 – 80 columns on average) there is a potential risk of Out Of Memory between 40K up to 100K rows range. This depends on number of columns in the dataset and quality of columns (e.g. which data type they belongs, if and how this is populated, etc.).

    If you pack up all these considerations, these are the actions that you might take (or have to) depending on your scenarios within the Microsoft Dynamics NAV 2009 R2 stack:

    1. If your report is raising an Out Of Memory exception in a range lower or close to 80/90K rows then you can try to optimize the report by reducing the Dataset. Reducing the dataset means :
      1. Write optimal code for RDLC Report (e.g. use CurrReport.SKIP when needed, avoid use data items for CALCSUMS and use record AL variables instead, rewrite the report to use drill-through to enable getting to details if required in the report - so still possible to move calculations to CSIDE – or refactor to use hyperlink to another report for details, etc.)
      2. Reduce the Dataset Columns (e.g. eliminate Section control that you do not use with RDLC report)
      3. Reduce the Dataset Rows (refactor as much as it possible to push in the dataset only the data that need to be printed)
    2. If your report is already in a range equal or higher then 80/90K then you have no other choices with NAV 2009 R2 than the following :
      1. Delete RDLC Report layout and enable Classic Client report fall back (this is the solution that I will warmly suggest and it is a really finger snap solution)
      2. (this is pretty obvious) Apply filters in the request page (or through AL Code) in order to reduce the amount of rows in the dataset and instead of print the report in one single shot, print it N times.

    And this is all about the Microsoft Dynamics NAV 2009 R2 stack and how to solve / workaround the problem in the feasible (and easiest way) within this version.

    Microsoft Dynamics NAV 2013 (RDLC 2008 – Report Viewer 2010) / NAV 2013 R2 (RDLC 2010 – Report Viewer 2012) is another story and challenge type.

    To resume, the milestone changes between Microsoft Dynamics NAV 2009 and Microsoft Dynamics NAV 2013 (and R2) are the following:

    1. Microsoft Dynamics NAV Server is now 64bit (finally…) while the Windows client still remains as 32bit application. This means that the client is still a physical bottleneck and are still valid the considerations related to memory footprint and dataset volume as reported previously for Microsoft Dynamics NAV 2009 R2.
    2. You cannot anymore enable Classic client report fallback but you have to use RDLC Report in any occasion.

    With these 2 new variables or constraints in mind, below how you could workaround / resolve the performance problem with Microsoft DynamicsNAV 2013  / Microsoft Dynamics NAV 2013 R2:

    1. Same considerations about Optimizing reports: if you receive (or think of receiving) an Out Of Memory exception you might go for optimize the report as much as you can IF you forecast that in the end your dataset will never ever exceed 70/90K rows.
    2. If you have heavy reports with a dataset volume higher than 70/90K rows then this is what you could do:
      1. Filter data and print the report N times, wherever possible (use common sense)
      2. Use the Job Queue to enable Server Side Printing. What is Server Side Printing? It is simply running Report Viewer totally in the background through NAS Services (that is using Background Sessions through STARTSESSION AL statement). Running Server Side means running under 64 bits context and therefore Report Viewer (“.NET component targeted for any CPU” = 64 bit enabled) will use ALL the memory available from the OS (e.g. if you have 32 GB it could reach up to consume all of these if you have to work with several MILLION of dataset rows – I have seen it with my own Italian eyes - ) and you will succeed in PRINT the report or, better, use SAVEASPDF to generate a PDF file to be consumed by the user.
      3. Use STARTSESSION AL statement as you like in your own custom code after gathering user filters and parameter and pass this to a Codeunit that does filter record(s) and run a SAVEASPDF in the background as per your exotic flavor.

    THE FUTURE

    The Microsoft Dynamics NAV Core team is fully aware about these scenarios and working hard on improving the RDLC Report performance and experience in future versions of Microsoft Dynamics NAV

    NOTE:

    In this blog post you will find a set of objects (1 Report, 1 Codeunit, 1 Page) to easily simulate an Out Of Memory exception or Save as PDF the report in background.

    Just import these NAV object set and run Page 50666. You can choose to simulate an Out Of Memory exception by clicking the appropriate Action and then Preview the Report or you can choose to SAVEASPDF the same Report via enabling a Background Session that would do this action Server Side. 

    Be sure to have at least 4 GB of Available Memory Server Side and just wait for the background session to end its activity and stream out the content of the report (this should take close to 5/6 minutes with a standard Cronus database, depending on resources).

    These postings are provided "AS IS" with no warranties and confer no rights. You assume all risk for your use.

    Duilio Tacconi (dtacconi)

    Microsoft Dynamics Italy

    Microsoft Customer Service and Support (CSS) EMEA

    A special thanks to Peter Borring Sørensen & Torben Wind Meyhoff from the Microsoft Dynamics NAV core team.

  • Microsoft Dynamics NAV Team Blog

    Coming Soon: Exporting and Importing Companies and Other Data

    • 9 Comments

    We are not quite ready yet, but we will soon announce the availability of new functionality for Microsoft Dynamics NAV 2013 R2: The ability to export business data, global data, and/or applications from one database and import the data into another database. Many of you used the FBK functionality to do this in earlier versions of Microsoft Dynamics NAV, but since we removed that backup/restore functionality in Microsoft Dynamics NAV 2013 R2, you have let us know how much you relied on it in your daily work. So we are working hard on this new functionality, and we will make an announcement when you can download the update.

    When the update is available, we will also update the Microsoft Dynamics NAV 2013 R2 Release Notes Follow-Up document, which is available here: https://mbs.microsoft.com/downloads/customer/NAV/NAV%202013%20R2/MicrosoftDynamicsNAV2013R2_ReleaseNotesFollowup.pdf

    Best regards,

    The Dynamics NAV team

  • Microsoft Dynamics NAV Team Blog

    Memory usage in Microsoft Dynamics NAV 2013 print preview

    • 9 Comments

    Periodically we receive requests where customers asking us about RTC print preview consumes all available memory and computers hangs.

    Repro scenarios are more/less similar: run report, click preview, go per pages up/down, close report. Run another report, click preview, go per pages up down and… RTC hangs.
    If we look to memory usage, NAV is using all available memory.

    If we analyze what has happened, we see: with every move per pages memory usage increase and increase and increase until all memory is used.
    It looks like typical memory leak because in NAV 2009 with the same repro everything is OK.

    However it is not so simple. What NAV does in this scenario is: it loads Microsoft Report Viewer 2010 with 2 files: report definition (RDL file where is described report structure) and record set. And that is all, next actions like preview/print/export are managed by report viewer. The same we have in NAV 2009 just it loads Report Viewer 2008 and .NET Framework 3.5 as NAV 2013 uses Report Viewer 2010 and .NET Framework 4.5. And here is reason pointing us to memory usage behavior: Report Viewer 2010 and .NET 4.5 uses another way to manage memory (named more advanced and more secure). However this ‘another’ way gets us mentioned questions from customers and really we can do nothing from NAV platform side – system works as it is designed to work.

    But things are not so bad. In .NET memory is managed very smart and not used memory is released by function named ‘garbage collector’. This function periodically review memory blocks and release not used. And actually it works: if we monitor memory during report previewing and after it close we see that in preview and going per pages memory usage increase, after preview close memory usage is still the same, but after 5-10 min used memory decrease to initial numbers. For example in my tests started RTC using 98.5 MB, after few previews and scrolls and etc. usage increases to 215 MB and doesn’t decrease if I close preview. But after few minutes garbage collector returns usage to 100.4 MB.
    We can force (in NAV platform) garbage collector to work faster and memory release will be faster, but this will increase processor usage and in many cases it is worse than memory usage.

    Few trick could help users do not meet memory problems:

    1. When we open report preview we see report in “funny” interactive mode. This is preview mode where we can change report view in some way described in report code. For example in report ‘Customer – Top 10 List’ sorting can be changed. But exactly this mode is memory monster. If we click ‘Print layout’ button in menu we come to ‘page view’ where we can change nothing in report and see exactly what will be printed. This mode doesn’t use memory so much, so we can use this view easier. Few additional points here: a) all report initially open in interactive mode so users need manually change mode; b) Mode is not available if report is not allowed to preview like Sales Invoice or Order Confirmation.
    2. Report run SAVEASPDF works better if we call it directly without request form. However then users need to do more actions to open report. But maybe this can be reasonable in some cases.
    3. And finally if there are requirements to run big reports with many pages (100 and more) then better is to run them on server side, just because server is 64 bits and usually has more available RAM. This can be done by creating codeunit which runs report SAVEASPDF. Then add codeunit to job queue. Job queue executes codeunit and create pdf file.

     

    New Information since Update Rollup 5:

     

     

     

    These postings are provided "AS IS" with no warranties and confer no rights. You assume all risk for your use.

     

    Gedas Busniauskas
    Microsoft Lithuania
    Microsoft Customer Service and Support (CSS) EMEA

     

  • Microsoft Dynamics NAV Team Blog

    How to Deploy a Microsoft Dynamics NAV 2013 R2 Help Server

    • 8 Comments

    As most of you have already found out, we, the NAV R&D team, have developed a new Help Server that shows Help on a website. Help is available for the Windows client as in earlier versions. With the Help Server, the same Help is available from the Web client. Choose a field, and context-sensitive Help opens.

    The Help Server is a website that displays HTML files. Yes, you read correctly: HTML files. So you don’t have to decompile the Microsoft CHM files anymore. But the really good news is that the Help that you created for your current NAV solution will still work with the new Help Server. You just need to build it again with the new Help Toolkit, and then copy the resulting HTML files to the relevant folder on the Help Server website. Then, you can start connecting your users to the Help Server.

    Here are the main steps for deploying your Help to your customers.

    1. Install the Microsoft Dynamics NAV 2013 R2 Help Server. For more information, see Microsoft Dynamics NAV Help Server in the MSDN Library.
      • When you choose the Help Server option in Microsoft Dynamics NAV Setup, a Help Server website is set up for you with folders containing the HTML Help that Microsoft provides.
    2. Install the Microsoft Dynamics NAV 2013 Help Toolkit that is available for download from PartnerSource.
    3. Rebuild your existing Help files with the NAV 203 version of HelpBuilder, but change some of the configuration settings. For more information, see Upgrading Your Existing Help Content in the MSDN Library.

    4. Add the HTML files that HelpBuilder creates to the relevant language-specific folders on your Help Server website.

    5. Grant your users access to the website.

    6. Configure the Microsoft Dynamics NAV 2013 R2 clients to look up Help on your Help Server.

      • This configuration is part of Microsoft Dynamics NAV 2013 R2 Setup. Alternatively, you can configure the Web client server components and the Windows clients manually.

    7. Start a Microsoft Dynamics NAV 2013 R2 client and access Help.

    You can set up a Help Server that all your users can access, or you can set up multiple Help Servers. You can modify the Microsoft-provided Help content without decompiling anything, and you can add and remove Help content whenever you want to. You can add links to existing Word documents or PDF documents to the navigation pane of the Help Server website, so that you users have a single point of entry for Help.

    With the Microsoft Dynamics NAV 2013 R2 Help Server, you can provide the Help content that is relevant for your users, and you can update Help without modifying each client computer.

    We will improve the Help Server in future releases of Microsoft Dynamics NAV, so we hope you will like it as much as we do.

     

    Best regards,

    The Dynamics NAV team

  • Microsoft Dynamics NAV Team Blog

    Update Rollup 6 for Microsoft Dynamics NAV 2013 has been released

    • 8 Comments

    Update rollup 6 for Microsoft Dynamics NAV 2013 (Build 35345) has been released.

    Update rollup 6 includes all application and platform hotfixes and regulatory features that have been released for Microsoft Dynamics NAV 2013 and includes hotfixes that apply to all countries and hotfixes specific to the following local versions:

    • AU – Australia
    • DE - Germany
    • DK - Denmark
    • FR - France
    • IT - Italy
    • NA – North America
    • NL – Netherlands
    • NZ – New Zealand
    • UK - United Kingdom

    Where to find update rollup 6

    You can download update rollup 6 from KB 2881294 - Update Rollup 6 for Microsoft Dynamics NAV 2013 (Build 35345).

    The hotfixes that have been released since update rollup 5 are listed in KB 2881294. For a full list of all hotfixes included in the update rollup, see the following CustomerSource and PartnerSource pages:

    CustomerSource:

    PartnerSource:

    More Information

    For more information about update rollups for Microsoft Dynamics NAV 2013, see Announcement of new hotfix process for Microsoft Dynamics NAV 2013.

  • Microsoft Dynamics NAV Team Blog

    Update Rollup 11 for Microsoft Dynamics NAV 2013 has been released

    • 8 Comments

    Update rollup 11 for Microsoft Dynamics NAV 2013 (Build 36076) has been released.

    Update rollup 11 includes all application and platform hotfixes and regulatory features that have been released for Microsoft Dynamics NAV 2013 and includes hotfixes that apply to all countries and hotfixes specific to the following local versions:

    • AU - Australia
    • DE - Germany
    • DK - Denmark
    • FR - France
    • IT   - Italy
    • NA - North America
    • NL - Netherlands
    • NZ - New Zealand
    • SE - Sweden
    • UK - United Kingdom

    Where to find update rollup 11

    You can download update rollup 11 from KB 2930616 - Update Rollup 11 for Microsoft Dynamics NAV 2013 (Build 36076).

    The hotfixes that have been released since update rollup 10 are listed in KB 2930616. For a full list of all hotfixes included in the update rollup, see the following CustomerSource and PartnerSource pages:

    CustomerSource:

    PartnerSource:

    More Information

    For more information about update rollups for Microsoft Dynamics NAV 2013, see Announcement of new hotfix process for Microsoft Dynamics NAV 2013.

  • Microsoft Dynamics NAV Team Blog

    Microsoft Dynamics NAV 2013 R2 available in the Windows Azure Portal under MSDN subscription

    • 8 Comments

    Ever wondered what it is like to work with Microsoft Dynamics NAV on Windows Azure - but found it too cumbersome even with our nice Windows Azure provisioning tools?  Then this might be something for you. 

    Today we have made Microsoft Dynamics NAV 2013 R2 easily available on Windows Azure with just a few clicks. The Microsoft Dynamics NAV 2013 R2 image is an exclusive offer for MSDN subscribers and includes a fully functional, ready to use Microsoft Dynamics NAV 2013 R2 installation including Microsoft SQL Server. The MSDN subscription gives you the well-known discounted prices and allows you to use it for development, test, and demo purposes, but not for production purposes.

    How to get it? Make sure you have an MSDN subscription and the subscription has Windows Azure benefits activated. Then follow these steps:

     

    1. Sign in to the Windows Azure Portal using your MSDN subscription.
    2. Choose the + sign at the bottom of the Portal page.
    3. Choose Compute, point to Virtual Machine, and then choose From Gallery.
    4. Select the MSDN filtering checkbox as shown in the following screenshot. This will filter the list to only show the available MSDN images.

    1. Choose the Microsoft Dynamics NAV 2013 R2 image.
    2. Choose the arrow in the lower-right corner.
    3. Fill in the relevant fields about the virtual machine as described in the following list:
      1. Specify the name of the virtual machine.
      2. Specify the size of the virtual machine, such as Medium.
      3. Specify the user name and password for connecting to the virtual machine.
      4. Specify the region  where you want to host your virtual machine, such as West Europe.
      5. Verify the remaining parameters. In most cases, the default values are sufficient.
    4. Choose the Finish icon to start the provisioning process.
    5. Once the image is provisioned after a few minutes, you can use Remote Desktop to connect to it. In the Azure Portal Virtual Machine page, choose the newly created image, and then choose Connect. Use the credentials that you specified step 7.

    When you are connected to the VM, you are welcomed to the Microsoft Dynamics NAV 2013 R2 virtual machine on Windows Azure:

    No further configuration is required and you can immediately start using the clients and the development environment.

    Best regards

    Kamil Koclega & Morten Jensen from the Dynamics NAV team

  • Microsoft Dynamics NAV Team Blog

    New Excel-Based Reporting Tool for Microsoft Dynamics NAV

    • 8 Comments

    It’s no secret that Microsoft Dynamics NAV customers and partners have needed an ad hoc reporting solution that’s easy to use. Well, now we have one!

    We’ve been working in cooperation with Jet Reports, Inc. on the development of an Excel-based reporting solution. The result is Jet Reports Express for Microsoft Dynamics NAV – a simple but effective business reporting tool that gives customers an easy and simple way to create high impact reports and helps us to enhance our BI & Reporting value proposition.

    Within a familiar Microsoft Excel environment, users will be able to access Microsoft Dynamics NAV data and utilize all of the Excel capabilities, such as Power Pivot, formatting, charting and Pivot Tables, to create powerful, insightful and well-formatted reports. There are multiple report templates available out of the box.

    Plus, users will be able to answer and analyze ad hoc business queries with real time data from Microsoft Dynamics NAV. It’s possible to access and combine data from NAV – including tables, fields, flow fields and dimensions, and you can slice and dice data and do consolidation. You can also drill down into any value in a report to see the underlying data with just one click.

    Jet Reports Express for Microsoft Dynamics NAV really is simple to work with and very easy to demo. It’s the perfect solution for the majority of the Microsoft Dynamics NAV customers who need a basic ad hoc reporting solution.

    Jet Reports Express for Microsoft Dynamics NAV will be available to Microsoft Dynamics NAV customers as new functionality at no additional costs, provided they are on an active Business Ready Enhancement Plan.

    The product can be downloaded via a link from PartnerSource and CustomerSource that will be available sometime in Q3 CY2011. Look out for more information on final release date.

    Stay tuned for more information about all the cool things customers can do and partners can demo with this smart reporting tool.

  • Microsoft Dynamics NAV Team Blog

    Let NAV Speak! (with .NET Interop and NAV 2009 R2)

    • 8 Comments

    In this blog is described a very simple usage of the .NET interoperability feature with Microsoft Dynamics NAV 2009 R2 and can be considered an extension of my previous blog: http://blogs.msdn.com/b/nav/archive/2010/07/09/let-nav-speak-with-a-simple-and-useful-client-add-in.aspx.

    It is intended just to familiarize you with this brand new feature proposed with the NAV 2009 R2 release.

    If you want to know more about .NET interoperability for NAV 2009 R2, please refer to MSDN link:

    Extending Microsoft Dynamics NAV Using Microsoft .NET Framework Interoperability

    http://msdn.microsoft.com/en-us/library/gg502499.aspx

    The .NET interoperability code snippet in this blog is based on the System.Speech namespace.

    http://msdn.microsoft.com/en-us/library/ms554861(v=VS.90).aspx

    My ingredients:

    • NAV 2009 R2
    • Windows 7 Enterprise

    Create your "Speak it!" action and let NAV speak Customer Names :

    1. Open Classic Client

    2. Go to the Object Designer

    3. Select Page object (alt+g)

    4. Select Page 22 "Customer List"

    5. Design Page 22 "Customer List" (alt+d)

    6. Select View > Page Actions (al+v, o)

    7. Create a new Action (F3) in the ActionItems container (see below)

    8. Change the properties of the Action as below:

    Caption - Speak it !

    Image - ViewComments

    Promoted - Yes

    PromotedCategory - Process

    PromotedIsBig - Yes

    9. Edit the code in the Speak it! Action (F9)

    10. Add those LOCAL variables

    dnSpeech

    DataType: DotNet

    Subtype: System.Speech, Version=3.0.0.0, Culture=neutral,PublicKeyToken=31bf3856ad364e35.System.Speech.Synthesis.SpeechSynthesizer

    RUNONCLIENT: Yes
    Synth

    DataType: DotNet

    Subtype: System.Speech, Version=3.0.0.0, Culture=neutral,PublicKeyToken=31bf3856ad364e35.System.Speech.Synthesis.SpeechSynthesizer

    RUNONCLIENT: Yes

    dnVoiceGender

    DataType: DotNet

    Subtype: System.Speech, Version=3.0.0.0, Culture=neutral,PublicKeyToken=31bf3856ad364e35.System.Speech.Synthesis.VoiceGender

    RUNONCLIENT: Yes

    I

    DataType: Integer

     

    NOTE: RUNONCLIENT is a property of each DotNet variable (shift+f4)

    11. Add this code snippet in the OnAction trigger

    ...

    // Copyright © Microsoft Corporation. All Rights Reserved.

    // This code released under the terms of the

    // Microsoft Public License (MS-PL, http://opensource.org/licenses/ms-pl.html.)

    // Use the constructor to create a new Synthesizer

    Synth := dnSpeech.SpeechSynthesizer();

    // http://msdn.microsoft.com/en-us/library/system.speech.synthesis.voicegender(VS.90).aspx

    // This is an enumeration assignment:

    // 0=NotSet,1=Male,2=Female,3=Netural

    dnVoiceGender := 2; //Female

    // NOTE: it will take the voice depending on what is

    //  installed locally (e.g. Windows 7 has Microsoft Anne voice)

    Synth.SelectVoiceByHints(dnVoiceGender);

    // Please, speak slowly (range [-10:10])

    Synth.Rate := -3;

    Synth.SetOutputToDefaultAudioDevice();

    Synth.Speak(FORMAT(Name));

    // Row below is not needed. Synth is a local variable therefore it will be

    // automatically disposed

    // Synth.Dispose;

    ...

    12. Save and compile (ctrl+s) page 22 "Customer List"

    Now... you are ready to let NAV speech the Customer Name from the customer list by simply click on the "Speak it!" action.

    These postings are provided "AS IS" with no warranties and confer no rights. You assume all risk for your use.

    Best Regards,

    Duilio Tacconi (dtacconi)

    Microsoft Dynamics Italy

    Microsoft Customer Service and Support (CSS) EMEA

  • Microsoft Dynamics NAV Team Blog

    Dutch Tax BAPI Support Changing to KPN Certificates (2012)

    • 8 Comments

    UPDATE!

    There have been some changes from the tax authorities since this post. For information about the changes, see Changes in Dutch Tax BAPI Support - Part 2.

    INTRODUCTION

    Electronic communication with the Dutch Tax administration is based on trusted connections using Digital Certificates. In 2011 an incident has occurred with Diginotar, one on the Certificate Authorities (CA), resulting in a situation that an infiltrator was able to create new certificates on his own for every random domain. This made the whole certificate-based environment unsecure and required facilities to make sure that trusted digital communication remains possible in the future.

    The Dutch Tax administration evaluated the different existing communication channels and decided to phase out one of these channels: BAPI-PIN. It has also been decided to no longer use Diginotar certificates but to give KPN (Getronics) the role as the Certificate Service Provider (CSP) for the future.

    SUBMITTING VAT AND ICP DECLARATIONS USING MICROSOFT DYNAMICS NAV

    You can choose to submit VAT and or ICP to the Dutch Tax Authority by manually filling in a web form (www.belastingdienst.nl). There is a limit however for the ICP declaration. The website allows a maximum of 99 lines to be entered manually. An ICP Declaration report can be printed from Microsoft Dynamics NAV to use as a guideline. 

    Microsoft Dynamics NAV supports the BAPI channel electronic communication. Within the BAPI channel both PIN and PKI method are possible by Microsoft Dynamics NAV.

    PIN is the public key method and mostly used within the Microsoft Dynamics NAV community. For this method you only need the certificates from the Tax authorities and CSP. To get these you have to fill in the fields on tab Certificates of the ‘Elec. Tax Declaration Setup’ page and get the certificates by the function ‘Get CA Tax Auth. Certificates’. The certificates for the PIN method can be acquired at no cost.

    PKI is the private key method. This method uses user certificates for encrypting the message and providing a digital signature. For PKI 4 different types of certificates are needed:

    • certificate from the tax authority (same as for PIN method)
    • CSP certificate. This will be used to check the certificates (same as for PIN method).
    • user certificate to encrypt the message (E-certificate)
    • user certificate for digital signature (DS-certificate/Authentication certificate)

    A company has to buy the user certificates. On the KPN site you will find all this information.

    TIMELINE

    With respect to PIN and PKI the following timeline has been set by the Tax authorities (latest communication in Feb 2012):

    • BAPI PIN: will be phased out by 1-1-2013 for all process flows (VAT, ICP, etc)
    • BAPI PKI: will remain. The certificates of Diginotar need to be replaced before 1-6-2012 by the certificates of the KPN. Until 1-6-2012 it will still be possible to use the Diginotar certificates. The tax authorities urge not to wait until the last day with changing certificates.

    MICROSOFT DYNAMICS NAV AND BAPI PIN

    In order to continue using PIN until 2013 you will need to change the certificate settings to KPN before June 2012.

    To realize this, please change the following settings in the “Electr. Tax Declaration Setup” under the “Certificates” Fast TAB (production environment parameters). Make sure you have no ongoing declarations.

    • Directory LDAP server:

    ldap.kpnbapi.managedpki.com:389

    • CA certificate search string:

    CN=KPN Corporate Market Tax CA G2,O=KPN Corporate Market BV,C=NL

    • Tax Auth. Cert. Search string:

    CN=Belastingdienst,OU=Servercertificaat E - zie CPS,L=Apeldoorn Joost van den Vondellaan 14 (0000),O=Belastingdienst (2000000002),C=NL

    No need to change other settings. After that you can renew the certificate by using the function “Get CA Tax Auth. Certificates” and do your normal submissions again.

    For testing purposes you can use the following test environment parameters (you should have a test account at Tax Authorities):

    • Directory LDAP server:

    ldap.testkpnbapi.managedpki.com:389

    • CA certificate search string:

    CN=KPN Corporate Market Tax TEST CA G2,O=KPN Corporate Market BV,C=NL

    • Tax Auth. Cert. Search string:

    CN=TEST Belastingdienst,OU=Servercertificaat E - zie CPS,L=Apeldoorn Joost van den Vondellaan 14 (0000),O=Belastingdienst (2000000002),C=NL

    MICROSOFT DYNAMICS NAV AND BAPI PKI

    If you are using the PKI method to submit the declarations, then you will need to ask for a (re)new(al) certificate at KPN. The Tax Authorities have already informed the users of PKI certificates on this process. Microsoft needs to investigate if Microsoft Dynamics NAV is able to work with KPN certificates under which conditions.

    Tests for requesting KPN PKI certificates and submitting declarations are in process at the moment. You will be informed in a timely manner what changes are needed.

    -Coen Overgaag

  • Microsoft Dynamics NAV Team Blog

    Introducing…. Metadata version in NAV 2009 SP1/R2 hotfixes

    • 8 Comments

    As a follow up to my previous post, we are happy to announce that, from build 32942, the hotfix releases will detect if objects need to be recompiled and prompt you to recompile accordingly. This will happen when importing incompatible fobs files or when applying new platform hotfixes.

    If you try to import fob files from previous (or possibly also newer versions), or if you export them from newer builds (32942 and newer) and back to NAV 2009 R2 or newer versions (up to build 32942), the system will detect that the metadata is incompatible and force a recompilation when imported. The same detection will happen if you apply a hotfix to your system, and your objects need to be recompiled.

    In the future, the metadata version (which is now in the Object Metadata table in field 27) will be updated if a compilation will be needed after applying a hotfix, not making it necessary always to re-compile the objects every time you apply a new hotfix (and preventing the RTC client from losing the connection to the server). The current metadata version is 60300, whereas the R2 runtime metadata version is 60200.

    Since we are changing a system table (table 2000000071), we need to do a database conversion. Moreover, since the objects are not recompiled with a database upgrade, you also need to recompile the objects that you need. The nice feature now, is that the RTC will prompt you on demand to recompile the objects that need recompilation (basically, the ones you use).

  • Microsoft Dynamics NAV Team Blog

    What to do when the setup.exe doesn’t start in Dynamics NAV 2009

    • 8 Comments

    The reason that setup.exe doesn't start can be many. But I will try to give you ha checklist that you can work through if you end up in this situation.

    1. Ensure that the user account running setup.exe have administrator rights.
    2. Try the DVD/download one another computer. If this work you have eliminated that it's any wrong on the installation media.
    3. Start the task manager and check if any setup.exe is running. Sometimes under very special circumstances the setup.exe crash and will prevent any other attempt to start it again by staying running. If you find any setup.exe process kill them. And try to run the setup.exe again.
    4. Start the task manager and check if any msiexec.exe is running. This may happen when a windows update is running or that another installation process is running or have crashed. The best solution in this case is to restart the machine and check again and try to run the setup.exe again. In most cases the msiexec.exe process will be gone.
    5. If msiexe.exe are still there it probably mean that windows installer are running something. You can on your own risk try to kill all of those processes. The risk you take here is that you may end up with something half installed from windows update or other source. So it's recommended to run windows update after this to ensure its ok.
  • Microsoft Dynamics NAV Team Blog

    How to get a Dynamics NAV report with a Web Service

    • 8 Comments

    1. Create a new codeunit. In this scenario we will call this codeunit "CUWebReport" with ID 50000

    2. Navigate to "C/AL Globals" and create a function called "GenerateReport"

    image 

    3. Select "Locals"

    4. Select the "Return Value" tab

    5. Set "Return Type"=Text and "Length"=100

    image

    6. With this completed close "C/AL Locals" window.

    7. Now with "C/AL Globals" windows active again. Select "Variables" tab.

    8. Create a variable called "filename" with "Data Type"=Text and "Length"=100

    image

    9. Now let's add the following code to this codeunit:

    filename := 'C:\inetpub\PdfDocuments\';
    filename += FORMAT(CREATEGUID);
    filename := DELCHR(filename, '=', '{-}');
    filename += '.pdf';
    REPORT.SAVEASPDF(111,filename);
    EXIT(filename);

    image

    10. Save and compile the codeunit.

    11. Now it's time to expose this codeunit as Web Service. Navigate to "Administration/IT Administration/General Setup/Web Services"

    12. Select codeunit 50000 and give this a service name, we use "Get_PDF_Report"

    image

    13. Now it is time to verify that we can see this web service. Open this URL  http://localhost:7047/DynamicsNAV/WS/services.

    You should now see this message in your browser, and your Web Service can now be called :

    image

    If you don't see this message, you might want to check that  the service "Microsoft Dynamics NAV Business Web Services" has been started.

    14. Now it is time to call the Web Service, in this example we use Microsoft Visual Web Developer 2005. And we use the following code to call the Web Service:

    Partial Class _Default
        Inherits System.Web.UI.Page

        Protected Sub Button1_Click(ByVal sender As Object, ByVal e As System.EventArgs) Handles Button1.Click
            Dim service As localhost.Get_PDF_Report = New localhost.Get_PDF_Report()
            service.UseDefaultCredentials = True
            service.Url = "
    http://localhost:7047/DynamicsNAV/WS/CRONUS_International_Ltd/Codeunit/Get_PDF_Report"
            Response.ContentType = "application/pdf"
            Dim pdfFileName As String = service.GenerateReport()
            Response.TransmitFile(pdfFileName)

        End Sub
    End Class

    But how to consume this Web Service is not in scope for this blog, so we suggest you have look our online help how to consume a Web Service from NAV 2009.

    Online help found here: http://msdn.microsoft.com/en-us/library/dd339004.aspx

    15. Now also remember to impersonate your web servers application to an appropriate Dynamics NAV user.

    16. After compiling a running our project we then get this button in our browser.

    image

    17. When activating this button, we get the report specified in Codeunit 50000 displayed as an PDF file in our browser.

    image

    Conclusion, now you can give this URL to people who don't have access to Dynamics NAV, and they can execute the report when they see a need for this.

    Thanks,

    Torben Meyhoff, SDE & Claus Lundstrøm, Program Manager, Microsoft Dynamics NAV

  • Microsoft Dynamics NAV Team Blog

    Let NAV Speak (with a Simple and Useful Client Add-in)

    • 8 Comments

    In this blog you will find the source code (below) to “let NAV speak.” You would have a wide range of possibilities to use this simple Add-in and enlarge this project.

    If you want to know more about Client Add-ins you can refer to this MSDN link:

    Extending the RoleTailored Client Using Control Add-ins and Microsoft Dynamics NAV 2009 SP1

    This simple Client Add-In is based on System.Speech namespace:

    Microsoft.Speech.Synthesis Namespace

    Step by step creation of the NSpeech Add-In

    (Remember the ‘DodgeBall’ rules: Develop, Sign, Place, Register and Develop)

    1. DEVELOP your add-in (in Visual Studio)
    2. Strong SIGN and build
    3. PLACE DLLs into Add-ins folder
    4. REGISTER the add-in in Table 2000000069, Client Add-in
    5. DEVELOP your C/AL code (in Object Designer)

    A. Create a New Class Project

    1. Open Visual Studio (in this example I am using Visual Studio 2010)
    2. Create a New Project (CTRL+SHIFT+N) with these parameters
      • Visual C# – Windows
      • Class library
      • .NET Framework 3.5
      • Name: NSpeech
      • Location: C:\TMP (or whatever location you like)
      • Solution Name: NSpeech
      • Create directory for solution

    NSpeechVS

    B. Create a Strong Name Key (SNK)

    1. Go to Project > Properties (NSpeech Properties…)
    2. From the Project Properties form go to the Signing tab
    3. Tick the Sign the assembly option
    4. Create a New SNK (e.g. TestSpeechNav.snk)

    NSpeechSign

    C. Add References to the Project

    1. Click on the Class1.cs tab (return to the project)
    2. In the Solution Explorer window select Reference, right Click, Add Reference
    3. Add reference to
      • Microsoft.Dynamics.Framework.UI.Extensibility (Version 1.3.0.0) (By default, the path to the assembly is C:\Program Files\Microsoft Dynamics NAV\60\RoleTailored Client)
      • System.Drawing (Version 2.0.0.0)
      • System.Speech (Version 3.0.0.0)
      • System.Windows.Forms (Version 2.0.0.0)

    NSpeechRef

    D. Develop your NSpeech Project

    (You can simply copy and paste this code into your Class project.)

    using System;

    using System.Collections.Generic;

    using System.Text;

    using System.ComponentModel;

    //Add a reference to the Add-in API (see the solution explorer) and all relevant references

    //Use all relevant references

    using System.Drawing;

    using System.Windows.Forms;

    using Microsoft.Dynamics.Framework.UI.Extensibility;

    using Microsoft.Dynamics.Framework.UI.Extensibility.WinForms;

    //this is to let this add-in speech

    //http://msdn.microsoft.com/en-us/library/dd146744(v=office.13).aspx

    using System.Speech;

    using System.Speech.Synthesis;

    namespace NSpeech

    {

        //Develop the control add-in class.

        //Assign a name to the control add-in (MyCompany.MyProduct.MyAddIn)

        [ControlAddInExport("Cronus.DynamicsNAV.NSpeech")]

        [Description("Let this Add-in Speak")]

      

        //Select a base class as a starting point.

        //Select interfaces to implement features, such as data binding or event handling.

        public class Class1 : StringControlAddInBase

        {

            //Implement control creation

            protected override Control CreateControl()

            {

                //Create a brand new TextBox

                TextBox control = new TextBox();

               

                //Define TextBox size

                control.MinimumSize = new Size(50, 0);

                control.MaximumSize = new Size(500, Int32.MaxValue);

               

                //Add a DoubleClick event for the TextBox

                control.DoubleClick += new EventHandler(control_DoubleClick);

                return control;

            }

            //Define a voice synth

            private SpeechSynthesizer synth;

            private void control_DoubleClick(object sender, EventArgs e)

            {

                //create a new speech synth and set default audio device

                synth = new SpeechSynthesizer();

                synth.SetOutputToDefaultAudioDevice();

               

                //Pass TextBox content in a string variable

                string data = this.Control.Text;

              

                //... and let NAV speak it!

                synth.SpeakAsync(data);

            }

        }

    }

    E. Build the NSpeech.dll

    1. Once you have all setup, you are ready to build your Client Add-In. Go to Build > Build NSpeech

    F. Place DLL into Add-in folder

    1. Locate/copy/paste NSpeech.dll (should be in your C:\TMP\NSpeech\NSpeech\bin\Debug folder) to the Add-ins folder of a machine where the RoleTailored client has been installed

    (typically the Add-ins folder is here: C:\Program Files\Microsoft Dynamics NAV\60\RoleTailored Client\Add-ins)

    G. Determine the PKT (Public Key Token) of NSpeech

    1. Launch the Visual Studio Command Prompt
    2. In the VSCP:

    Sn –T “C:\TMP\NSpeech\NSpeech\bin\Debug\NSpeech.dll”

    In the following example, 250f71f35a467631 is the PKT (Public Key Token) needed to register the Add-in into NAV. (You will have another value.)

    NSpeechSn

    H. Register the NSpeech dll

    1. Open Classic Client
    2. Open Object Designer (SHIFT+F12)
    3. Select Table object (ALT+B)
    4. Run Table 2000000069 Client Add-in
    5. Insert a new line with these values:
    Field Value
    Control Add-in Name Cronus.DynamicsNAV.NSpeech
    Public Key Token 250f71f35a467631 (this is an example)
    Version 1.0.0.0
    Description Let this Add-in Speak

    How to Use This Add-in

    As an example, you can just let NAV speak the content of the field “Name” in Customer Card page (Page 21).

    1. Open Classic Client
    2. Go to Object Designer (SHIFT+F12)
    3. Select Page object (ALT+G)
    4. Design Page 21 Customer Card
    5. Go to Name Field and Edit properties (SHIFT+F4)
    6. Fill the ControlAddIn property with this value Cronus.DynamicsNAV.NSpeech;PublicKeyToken=250f71f35a467631 (change the PublickKeyToken value to the one that you have determined at step G.)
    7. Save and compile the page (CTRL+S)

    Now…you are ready to let NAV speak the Customer Name from the customer card by simply double clicking on on the Name!

    This simple Client Add-in project may be used in, e.g.

    • Speak an alert if the availability of an Item is lower than expected in a document page (e.g. sales quote)
    • Speak an alert if a Customer exceeds assigned Credit Limit
    • Speak internal comments for an item, a vendor, a customer, wherever this is needed
    • … and many more

    This simple Client Add-in project may be enlarged, e.g.

    • It could be possible to set the volume of the voice
    • It could be possible to set the rate of the voice
    • It could be possible to select another voice instead of “Microsoft Anne” default in order to speak words with proper accent language
    • It could be possible to save a .wav file instead of speaking it or even perform both activities
    • … and many more

    These postings are provided "AS IS" with no warranties and confer no rights. You assume all risk for your use.

    Best Regards,

    Duilio Tacconi (dtacconi)

    Microsoft Dynamics Italy

    Microsoft Customer Service and Support (CSS) EMEA

Page 3 of 41 (615 items) 12345»