Thursday, June 30, 2016

Dynamic Text Size and Color in RTC Report | NAV


Never say no when a client asks for something, even if it is the moon. You can always try, and anyhow there is plenty of time afterwards to explain that it was not possible. -Richard M. Nixon


The requirement was for the Report section in Microsoft Dynamics NAV 2016. Some of the contents of the report are to be adjusted into given textbox. The text size was supposed to vary and fit into the given text area. 
For the Example Purpose i have taken Sales Invoice and Ship to Name as a Field. It can be achieved in any Report.

<Scenario>
TEST CASE I: Text length is small - So It can keep its Original Size [14 Pt]



TEST CASE II : Text length is Larder to fit in the area with same Font so it was adjusted to [10]

Note: For the Simplicity i have kept it just to two condition. 14Pt or 10Pt


<Solution>
Its as simple as IF/Else Condition in CAL Code. 

//----------------------------//

Code Syntax:

//Using IIf Condition
IIf(Len(Variable_Value) <= Lenght,“True_Value Pt”,“False_Value Pt”)


//-----------------------------//

Example:

//Using IIF Condition for Size
=IIf(Len(Code.GetData(11,1)) <= 10, “pt”, “16pt”)



Alternative: =IIf(Len(Field!DatasetVar.Value) <= 10, “pt”, “16pt”)
//-----------------------------//

//Using Switch Case for Size

=Switch(Len(Code.GetData(11,1)) <= 10, “14pt”, 

Len(Code.GetData(11,1)) >=11 AND Len(Code.GetData(11,1))<=20 , "10pt", Len(Code.GetData(11,1)) >20 , "5pt")


//Using Switch Case for Color
=Switch(Len(Code.GetData(11,1) <= 5, "Green", 

Code.GetData(11,1) >=10 AND Code.GetData(11,1)<=15 , "Amber", Code.GetData(11,1) >15 , "Red")



//---------------------------------//

Note: We can use the Same type of Code for Color and other related property of Text. 

This small code trick turned out Quite handy to impress the client.
Cheers!!!

The journey of Microsoft Dynamics NAV | PCPlus to MADEIRA | A Walkthrough

The company PC&C was founded founded by Jesper BalserPeter Bang and Torben Wind in Copenhagen, Denmark.


Figure: PCPlus (1984) - Finance, Customers, Vendors and Inventory.

1983 - The company PC&C was founded founded by Jesper Balser, Peter Bang and Torben Wind in Copenhagen, Denmark.

1984 - Launch of PCPlus in Denmark & Norway – a character-based accounting solution for SOHO (small office/home office) market.


1984 - “Beauty of Simplicity” is the first company slogan.



Figure: 1987 - Navigator 1

1987 - Launch of the first version of Navision. This first character-based version Navision was basically an upgraded version of PCPlus. But the biggest change was that it was a able to run as client/server application over a LAN, where PCPlus was a single-user system. In the beginning it was only sold in Denmark and here it was distributed by IBM to their Erhvervscenters (business centers), who was required to fulfill a long number of certifications before they where allowed to sell the product. In Denmark Navision was called Navigator or most often IBM-
Navigator. 

Figure: International Version

1990 - Launch of Navision version 3.0. This was a big change to the previous versions, as it introduced AL (application language - very similar to C/AL) based on the Pascal development language. This allowed the user to do very advanced modifications, compared to both the previous versions (where only reports, tables and forms could be changed). In fact they where unique in the market at that time. Only a few years later Navision's biggest competitor at this time, the also Danish company Damgaard Data, introduced their XAL (extended application language).

1990 - Market expansion moves beyond Scandinavia into Germany. Spain and the United Kingdom. Here the name Navision was used for the first time. 


1993 - Navision initiates a major development effort to create a new generation of Navision solutions based on Microsoft Windows 32-bit client/server platform.

Figure: New generation of Navision solutions based on Microsoft Windows 32-bit client/server platform.

1995 - Launch of Navision Financials 1.0, an accounting solution based on Microsoft Windows 32-bit client/server platform.


1995 - Launch of Navision Financials Windows 95 version and Windows NT. 


1995 - The Navision Online User Group is started by Erik P. Ernst. 


1997 - Launch of Navision Financials with simple Contact Management / CRMfunctionality.


1998 - Launch of Navision Manufacturing.


1999 - Launch of Navision Advanced Distribution.


2000 - Navision Financials receives Microsoft Windows 2000 Professional Certification and Microsoft Windows 2000 Server Certification.


2000 - Launch of Navision Commerce Gateway – worlds first solution based on Microsofts BizTalk Server.


2000 - Launch of Navision User Portal – worlds first solution based on Microsofts Digital Dashboard


2000 - The two big competitors from Denmark Navision Software a/s and Damgaard A/S (the developers of Concorde, C4, C5, XAL and Axapta) merge under the name NavisionDamgaard A/S.


2001 - Launch of Navision Attain 3.0 which includes:
·                     Re-branding of Navision Financials 
·                     Integration of e-commerce applications, Commerce Gateway, Commerce Portal 
·                     User Portal, browser-based access 
·                     Supply chain collaboration functionality including manufacturing and distribution 
·                     Extended financial management functionality 
·                     Extended and new functionality within customer relationship management 


Figure: Navision Financials Rebranding into  Navision Attain

2001 - Navision Attain receives Designed for Microsoft XP logo Awards/Certifications

2001 - The name NavisionDamgaard A/S was changed to the more easy pronounceable Navision A/S.


2002 - It was not a big surprise when Microsoft Corporation aquires Navision A/S. Most people had seen it coming. In 2000 Microsoft had a aquired Great Plains, Navision's biggest competitor on the US market, but the rumors said that Microsoft had realized that GP was not good enough to base their whole strategy upon. Navision and Great Plains was put together in a group at Microsoft called Microsoft Business Solutions and the names changed accordingly to Microsoft Business Solutions Navision. The domain name of this website also changed from 


www.navision.net to www.mbsonline.org.



Figure: Microsoft Business Solution

2003 - Microsoft first starts talking about Project Green. This was an initiative to merge the platforms of Navision, Axapta, Great Plains and Solomon into one system. It was first told that the first beta would be available in Q4 2004. But so far it has not happend and in 2007 Microsoft completely stopped talking about Project Green, as the they had realized that it would be a much bigger project and it also scared of a lot of potential customers, who would not invest in a software with no future.

2005 - Microsoft Business Solutions Navision 4.0 was released.


2005 - Navision version 5.0 was announced as the new big version with a completely new user interface to be released in late 2006. 



Figure: Navision Version 5.0

2005 - Microsoft changes the names the applications from Microsoft Business Solutions to Microsoft Dynamics. At the same time the name Navision is changes to NAV (not nav but n.a.v. - with all letters pronounced). 


2006 - Microsoft announces that the new user interface will not be part of Navision 5.0, but instead it will be released 6-12 months later as Dynamics NAV 5.1.


2007 - Navision version 5.0 was released. But without the new user interface, but with many new application features such as a completely redesigned Job module. The job module had basically not changed since the release of Navision 3.01 (the character based version in 1990).


2008 - First Microsoft announced that the name of the next version of Navision would not be Navision 5.1, but Dynamics NAV 6.0. Just a few months later they changed it so that it would be Dynamics NAV 2009.


2008 - At Convergence in Copenhagen in November 2008 Dynamics NAV 2009 was finally released. Included in the new version was:


The new client is released as the RoleTailored Client and from now on the old is called the Classic client. Also introduced with NAV 2009 is the new form object called Pages and the new RoleTailored reports that you must design using the Visual Studio Report Designer. 



Figure: First Role Tailored Client

2009 - Dynamics NAV 2009 Service pack 1 was released on September 1st. Microsoft Dynamics NAV 2009 introduces a service tier and the ability to expose Codeunits and Pages as web services. The web services can be used by applications such as InfoPath or Excel to call Navision business logic via codeunits or read and update data through Page objects.

Figure: Web Client Introduced


Before NAV 2013, Microsoft Dynamics NAV gave administrators the option of using either a native database server or Microsoft SQL Server, as the DBMS. SQL Server is now the exclusive database option for NAV. Retiring the old "Native database" has given way to long awaited improvements in reducing/eliminating database locking, which can occur when hundreds or thousands of users are using the same data at once.


2013 to 2015 - the "modern" versions


2013- 
One of the most successful products in Microsoft is Dynamics C5. This little hybrid of an old Danish SMB accounting system, once called Concorde (which grew into XAL and later Axapta), has been the most selling accounting system in Denmark, with more than 50% of their market. For many years Microsoft had tried to copy it's success (Navision Entrepreneur) and find out what to do about C5. 
Navision was the obvious choice. But if NAV should be a possible choice, then it needed more standard functionality. They had to match both what is in C5 and what their competitors offer in the same price range. Just lowering the price would not help, if the customers still had to buy expensive third party add-ons to get bank integration, pdf import/export etc. These add-on modules alone would cost up to 10 times more than the base license for C5.
So more standard functionality had to be build. NAV also needed to become easier to administrate, if partners should be able to handle 1000's of customers. Not to mention the well known issue of upgrading customized solutions. How to handle upgrading 1000's of customer at once?
Support for PowerShell was now also part of NAV 2013. Already with NAV 2009 it had been possible to manage NAV services in NAV 2009, but now it was also for use in other areas. With NAV 2013 "Microsoft Dynamics NAV Windows PowerShell Cmdlets" was introduced.
More PowerShell and functionality in NAV 2013 R2
On October 31st. 2013 Dynamics NAV 2013 R2 was released. The release was also a goodbye to the Development Environment (aka the classic client) as the place to handle companies and backups. From now on backups and restore was to be handled in SQL, and companies from within the Windows client. The reason was that NAV now supported multi-tenency, which allows partners (and users) to setup environments where the application (objects etc.) is separate from the data. This way each customer can have it's own database (with multiple companies), but still share the actual application with many other customers.

The first release was not the best work from Microsoft. In the beginning there where no way to copy/import-export companies, inside NAV. Except from using PowerShell, which was introduced with NAV 2013. This came to a complete surprise and resulted in a lot of complaints especially from the partners and developers. But they worked fast, and had many online "firefighting" meetings with the NAV MVP's.
The R2 release also contained an entirely new Cash Management functionality, largely improved Bank Reconciliation and standard functions to handle import of bank transactions, including SEPA support for debits and credits payments.
The initial released included the default setup to most Danish banks, so that it could be part of Dynamics C5 2014. Inside a C5 2014 is just standard NAV 2013 R2, but using different role centers turns it into a much simpler setup and UI, leaving about most of the advanced functions. But at a very low monthly price - only available as a "rentable" SPLA license.

Figure: Microsoft Dynamics NAV 2013

2014 - Microsoft Dynamics NAV 2013 R2 Upgrade Patch
Microsoft Dynamics NAV with this new patch allowed CRUD(Create- Read - Update- Delete) Application on its Database Through ODATA Web Service. It facilitated creation of more 3rd Party software over MS SQL Server Database used by NAV System. 


The product team continues to listen to the the community of both partners and customers, who for years have had one major problem with Navision. The same thing that made Navision a success, the ability to customize almost every little part of the system, also makes upgrades a very time consuming. And despite good 3rd party tools like MergeTool, then there is really no tools assisting in code upgrades. The result is that many customers never upgrades, beyond the main version they are on.
In October 2014 Dynamics NAV 2015 was released. Besides the many application improvements, then upgrades was in focus in this release. It contained new data upgrade codeunits and a new set of PowerShell applets enabling partners to automate the whole upgrade process. Including code compare and merge. There is no longer a way around learning to use PowerShell.

New capabilities in Microsoft Dynamics NAV 2015 include
·                     Tablet and touch-optimized user experience.
·                     Faster access to information that matters.
·                     Radically simplified invoice design and production.
·                     Additional optimization to deploy in the cloud on Microsoft Azure and with Office 365.
2015- Dynamics NAV 2016 - a big release
On October 5th. 2015 Dynamics NAV 2016 was released. The release had a lot of new functionality, but for the geeks and the end-users. The release introduced a new code-editor, replacing the old, which more or less was unchanged since the first Windows version of NAV was release. The new editor introduced IntelliSense similar to what was known in most other development environment, such as Visual Studio.


Figure: Mobile Client, Tablet Client, PC Client and Web Client


Figure: Customized View of Microsoft Dynamics NAV 2016



2016- What comes next after NAV 2016? Dynamics NAV "Madeira" : Currently CTP (Community Technology Preview) | Office 360 | Dynamics 360 Concept

The Beta version of Project Madeira has been released for US Partners. Every one seems confused about the future of NAV after release of this Beta CTP. Independent developers are still trying to find the ways it can be harvested for the Implementation.
 


Figure: The Madeira using Google Chrome


Microsoft Dynamics NAV Madeira:
·                     Further enhanced 'in' Office 365 experience
·                     Further enhanced 'on' Azure experience (ERP in the Cloud)
·                     Better developer experience
·                     More service integrations
·                     Fast set-up
·                     Easy configuration
·                     ...



Mobile first, cloud first
Microsoft Dynamics NAV 2016 is the most recent version of Dynamics NAV. Microsoft is however already developing the next version, the code name is Microsoft Dynamics NAV 'Madeira'. Read more about Microsoft Dynamics NAV
---------

-Credit
·                     Sriram Maringanti Note
·                     Dynamics User Group Post http://dynamicsuser.net/wikis/navdev/the-history-of-dynamics-nav-navision.aspx


Wednesday, June 29, 2016

Basics of NAV Report Design using SQL Report Builder.



Visual  Studio versus Report Builder

Both Visual Studio and Report Builder can be used to Design and Customize the RTC report of NAV. NAV takes Visual Studio as its default report designer but we can change the setting to take sql report builder as the report designer. Report designer is inbuilt i.e.  Unlike Visual studio we don't need to install it. It is comparatively Faster but with some insignificant limitations. I personally prefer Report because its cool and fast.

STEP 1: Setting for Selection of Designer tool

We can set the Report Builder Option in Tools/Options/[Use Report Builder = YES]



STEP 2: Creating Simple Layout using Report builder

Lets design a new report with Dataset from Item Table.


STEP 3: Open the Report Builder from View/Layout

On the left-hand side you can see the Report Data section in Report Builder.

• Built-in Fields: The built in fields can be considered as constants or variables. They are not a part of   the dataset and can be used in the layout, in textboxes or in expressions.

• Parameters: Parameters contain the labels and captions that were added via the IncludeCaption      property on a column, or via the label designer.

• Images: Images can be imported into the report layout as embedded images.

• Data Sources: In Dynamics NAV RDLC reports, there is always exactly one data source. At runtime  it links to the report dataset, generated by the report dataset designer.

• Datasets: In Dynamics NAV RDLC reports, there is always exactly one dataset. It  has the name Dataset_Result and contains the columns that were added in the report  dataset designer.


STEP 4: Wizard Feature which is the Coolest of all. 
Report Builder contains wizards to help you to create a report layout. Let's use them to create our item list.

1. In the Insert tab in the ribbon, click on Insert, then Table, and then Table Wizard.



2. In the Choose a Dataset window select Dataset_Result and click on Next.


3. In the Arrange fields window you can now see the columns on the left. You can drag them to the right and put them into Values, Column Groups and/or Row groups. Let's drag the fields into Values:

4. For the inventory_item, click on the little arrow and select Sum. Click on Next.

5. In the Choose the Layout window, you can select grouping and totaling options, but only if you added a row and/or column group in the previous window. Click on Next.

6. In the Choose a Style window, you can select a style template.

7. The wizard has ended and it has added a table to the body of the report:




Now we can Save the Layout and Run the Report in RTC Environment.

STEP 5 : Run the Report

Conclusion:

The report design using Report builder is easy and with some enhanced feature. Its faster and smooth. It is only supported by latest version of NAV, for the older version of RTC we still require Visual Studio.