AL, Business Central, Dataverse, Enum, Extension, Integration, Page, Table

Create Custom table & page in Business Central

This is the Fourth post in the series. If you want to go to previous post click here.

From the series of steps this post is dedicated to Step-3:

As a third Step we will Create New Table(s) and Page(s) in Business Central

Below are the AL code for Prospect table, Prospect card page & Prospect list page that will be created in Business Central via Extension, used for Integration with Dataverse.

Table in BC to Integrate from Dataverse

table 50120 "Prospect"
{
    DataClassification = ToBeClassified;
    DrillDownPageID = "Prospects";
    fields
    {
        field(1; "No."; Code[20])
        {
            DataClassification = ToBeClassified;
        }
        field(2; "Name"; Text[50])
        {
            DataClassification = ToBeClassified;
        }
        field(5; "Probability"; Integer)
        {
            DataClassification = ToBeClassified;
        }
        field(6; "Contract Amount"; Decimal)
        {
            DataClassification = ToBeClassified;
        }
        field(7; "Contract Amount (Base)"; Decimal)
        {
            DataClassification = ToBeClassified;
        }
        field(8; "Stage"; Enum "Stage Type")
        {
            DataClassification = ToBeClassified;
        }
        field(11; "Forecast Revenue"; Decimal)
        {
            DataClassification = ToBeClassified;
        }
        field(12; "Forecast Revenue (Base)"; Decimal)
        {
            DataClassification = ToBeClassified;
        }
    }

    keys
    {
        key(key1; Name)
        {
            Clustered = true;
        }
    }
}

Card Page for above Table

page 50121 "Prospect Card"
{
    Caption = 'Prospect Card';
    PageType = Card;
    UsageCategory = Administration;
    SourceTable = "Prospect";

    layout
    {
        area(Content)
        {
            group(General)
            {
                field("Name"; Rec."Name")
                {
                    ApplicationArea = All;
                }
                field(Probability; Rec.Probability)
                {
                    ApplicationArea = All;
                }
                field(Stage; Rec.Stage)
                {
                    ApplicationArea = All;
                }
            }

            group(Details)
            {
                field("Contract Amount"; Rec."Contract Amount")
                {
                    ApplicationArea = All;
                }
                field("Contract Amount (Base)"; Rec."Contract Amount (Base)")
                {
                    ApplicationArea = All;
                }
                field("Forecast Revenue"; Rec."Forecast Revenue")
                {
                    ApplicationArea = All;
                }
                field("Forcast Revenu (Base)"; Rec."Forecast Revenue (Base)")
                {
                    ApplicationArea = All;
                }
            }
        }
    }
}

List Page for above Table

page 50120 Prospects
{
    PageType = List;
    ApplicationArea = All;
    UsageCategory = Lists;
    SourceTable = Prospect;
    Caption = 'Prospect List';
    CardPageId = "Prospect Card";
    Editable = false;

    layout
    {
        area(Content)
        {
            repeater(GroupName)
            {
                field(Name; Rec.Name)
                {
                    ApplicationArea = All;

                }
                field(Probability; Rec.Probability)
                {
                    ApplicationArea = All;

                }
                field("Contract Amount"; Rec."Contract Amount")
                {
                    ApplicationArea = All;

                }
                field("Contract Amount (Base)"; Rec."Contract Amount (Base)")
                {
                    ApplicationArea = All;

                }
                field(Stage; Rec.Stage)
                {
                    ApplicationArea = All;

                }
                field("Forcast Revenue"; Rec."Forecast Revenue")
                {
                    ApplicationArea = All;

                }
                field("Forcast Revenue (Base)"; Rec."Forecast Revenue (Base)")
                {
                    ApplicationArea = All;

                }
            }
        }
    }
}

Enum for field Stage

enum 50120 "Stage Type"
{
    Extensible = true;
    AssignmentCompatibility = true;

    value(0; "Lead") { Caption = 'Lead'; }
    value(1; "Opportunity") { Caption = 'Opportunity'; }
    value(2; "Won") { Caption = 'Won'; }
    value(3; "Lost") { Caption = 'Lost'; }
}

Now you are good to proceed with Next Step.

You can jump to Next Step from here.

Container, Docker, Docker Info, How To, Image, Information, Instalation & Configuration, Kill, List, Networks, Prune, Remove, Start, Stop, Tip & Tricks, Volumes, Wipe Docker

Docker Maintenance

Continuing from where we left in previous post, if not seen you can visit here.

During development, your resource utilization can grow unorganized with old, outdated, and unused components. Where you may require maintenance to manage, free resources and reclaim for other uses.

Let’s learn few commands which will be useful to work and maintain docker containers, images and other resources.

Today we will learn how to organize a Docker environment by removing Docker images, containers, volumes, and networks. 

Using these commands makes Docker container management fast and easy.

A container creates a specific environment in which a process can be executed. As we all are aware of many containers are created over time, tested, and uninhibited during the development lifecycle.

Therefore, it’s important to know how to find unnecessary containers and remove them.

First, you will need to list all Docker containers using the command:

docker container ls -a

This will list all running containers, their IDs, names, images, status and other parameters.

Most of the time you are only interested to have list of all the containers only by their numeric ID’s, that you can obtain running the command:

docker container ls –aq

To stop a specific container, enter the following:

docker container stop [container_id]

Replace [container_id] with the numeric ID of the container from your list.

You can enter multiple container IDs into the same command.

To stop all containers, enter:

docker container stop $(docker container ls –aq)

This forces Docker to use the list of all container IDs as the target of the stop command.

To launch or start a single or multiple stopped Docker containers

docker start [options] container_id

List all Docker Resources

Enter the following commands to display resources:

docker info

docker container ls

docker image ls

docker volume ls

docker network ls

The above-mentioned lists number of containers, images, and information about the Docker installation. These commands can help you locate and identify resources that you want to keep, or that you want to delete.

Remove a Stopped Container

To remove a stopped container, use the command:

docker container rm [container_id]

Remove All Stopped Containers

To remove all stopped containers:

docker container rm $(docker container ls –aq)

Remove All Docker Containers

To wipe Docker clean and start from scratch, enter the command:

docker container stop $(docker container ls –aq) && docker system prune –af ––volumes

Let’s decode above command line as:

docker container ls –aq

will list all containers with their numeric ID

docker container stop

will stop all containers obtained from above list

&& docker system prune –af ––volumes

Will remove all stopped containers and volumes

Here (a) indicates this should apply to all containers &(f) without a required confirmation.

How to Remove Docker Images

Docker images are files, which include multiple layers used to run code within a container.

Images may go through many iterations during development. Old and outdated images can clutter your system, taking up storage space and making searches more difficult.

To remove a Docker image, start by listing all the images on your system:

docker image ls

The output displays the locally available Docker images, as seen below.

Make a note of the IMAGE ID – this is the identifier used to remove the image.

Then, remove the unwanted image(s):

docker image rm [image_id1]

Replace [image_id1] with the image ID you pulled from the first command. You can enter a single Image ID, or multiple IDs for removal.

The system may respond to your request with an error message, that there is a conflict and it is unable to remove the repository reference.

This indicates that a container is using the image. You need to remove the container first before you can remove the image.

How to Remove Docker Volumes

A volume is used to store Docker data.

It helps store and organize data outside containers in a way that it’s accessible to multiple containers.

Use the following command to generate a list of all the available Docker volumes:

docker volume ls

Take note of the VOLUME NAME you want to remove.

Then enter:

docker volume rm VolumeName

Make sure to replace VolumeName with the actual name you generated with the previous command.

If the volume is in use by an existing container, the system responds with an error. This means need to remove the container first.

How to Remove Docker Networks

Docker networks allow different containers to communicate with each other freely while also preventing traffic from outside the network. This is typically done with a Docker bridge network.

The prune command removes all unused networks.

Removing a Single Network

Display a list of all existing Docker networks with the command:

docker network ls

Take note of the NETWORK ID – this is the identifier used to remove a specific network. Then, enter:

docker network rm [networkID]

Replace [networkID] with the ID you captured from the first command.

You may receive an error message that says the network has active endpoints. That means that the network is currently in use by containers. You need to remove the containers that are using the network before you can remove the network.

Remove All Unused Docker Objects

The prune command automatically removes all resources that aren’t associated with a container. This is a streamlined way to clean up unused images, containers, volumes, and networks.

In a terminal window, enter the following:

docker system prune

Additional flags can be included:

a To include stopped containers and unused images

–f  Bypasses confirmation dialog

––volumes Removes all unused volumes

Also, you can specify a single type of object to be removed, instead of the entire environment:

docker container prune

docker image prune

docker volume prune

docker network prune

Running docker system prune -a removes both unused and dangling images. Images used in a container, either currently running or exited, will NOT be affected.

Finally, my docker is clean:

May come with more commands and maintenance tips in future post. While writing this post I was using limited resources, so was unable to attach screen shot for each command. In future may add more scenarios.

Till then keep experimenting & learning.

Container, Containerization, Docker, Image, Kill, List, Start, Stop, Tip & Tricks

Docker Basics

Like any other software, Docker introduces users to a new range of terminology related to its services. Users need to get familiar with concepts such as Dockerfilesimagescontainers, and other Docker-specific words.

Once you have mastered the vocabulary, the next step is to get used to using Docker commands. A list of all the commands and options is quite extensive and would take time to learn them all by heart.

What is Docker?

Docker is a popular virtualization tool that replicates a specific operating environment on top of a host OS. It is used by development teams to ensure consistency across different machines. It is a software that offers a set of platform-as-a-service products for developing and deploying applications by packaging software in containers.

What is Container?

A container uses an image of a preconfigured operating system optimized for a specific task. When a Docker image is launched, it exists in a container. For example, multiple containers may run the same image at the same time on a single host operating system.

Containers are designed to provide a self-sufficient environment, with all the libraries and configurations needed for the software to execute.

Containers are lightweight, portable, virtual environments that developers can share without risking inconsistencies in development. Due to these incredibly useful features, now organizations are switching from using virtual machines to Docker containers.

What is Containerization?

Containerization is defined as a form of operating system virtualization, through which applications are run in isolated user spaces called containers, all using the same shared operating system (OS).

No matter if you are new to Docker or already have some experience with containerization, it is always good to have a reference point for all the common Docker commands.

During development, they can grow unorganized with old, outdated, and unused components. Where require maintenance to manage, free resources and reclaim for different uses.

Let’s learn few commands which will be useful to work and maintain docker containers, images and other resources.

We will see few options to list, start, and stop, Docker containers.

The basic format for using docker is:

docker command [options]

To list all running Docker containers

docker ps

To list all containers, both running and stopped

docker ps –a

Since I am having only one container running at moment, so to show difference from previous command I stopped the container.

Now I have started the container and issued same commands as above.

Conclusion:

Docker ps lists only running containers

Docker ps -a lists running and stopped containers.

To list containers by their ID

docker ps –q

My Container was running

Remember from above Docker ps -a lists running and stopped containers. My Container is stopped

To list the total file size of each container

docker ps –s

You can check supported options using:

Use the docker stop command to stop a container:

docker stop [option] container_id

By default, you get a 10 second grace period. The stop command instructs the container to stop services after that period. Use the –time option to define a different grace period expressed in seconds:

docker stop –time=20 container_id

To Start Container

docker start container_id

To immediately kill a docker container without waiting for the grace period to end use:

docker kill [option] container_id

To stop all running containers, enter the following:

docker stop $(docker ps –a –q)

The same command could be used with kill. This would stop all containers without giving them a chance to exit.

Don’t forget to check next post where we will discuss about commands helpful in doing maintenance of containers.

AL, Array, BC14, BC17, Business Central, Collection, Development Tips, Dictionary, Dynamics 365, How To, Information, List, Modern Development Tool, on-premises, Tip & Tricks, Visual Studio Code, Wave 1, Wave 2, Web Client

Working with Collections

Today we will learn three types of collections supported by AL.

A collection is a complex type that contains multiple values in one variable.

You can’t have values with different types in the same collection. For example, you can’t add date values in a collection that only allows integer values.

The three types of collections that AL supports are:

  • Array
  • List
  • Dictionary

We will discuss about each type of collections in this post with examples.

Let’s start with most familiar collection we have used with old versions of Navision too, yes you are right, I am talking about Arrays.

Arrays

Arrays are complex variables that contain a group of values with the same data type.

An array holds multiple values, and these values are stored in the elements of the array. You can access these values by using the index, which can also be a value that is stored in another variable. With this design, you can create a loop where you increment a certain variable to loop through every element in an array.

By using the Dimension property, you can define how many dimensions that the array will hold.

When creating a variable of an array data type, you first need to define how many elements that you’ll have in the array. The most commonly used array is the one-dimensional array, which is a list of elements with the same data type.

You can represent an array as a row of values.

To create an array, use the following code:

SalesAmount: array[10] of Integer;

To access an element in an array, use the array element syntax:

SalesAmount[5] := 0;

Unlike other programming languages array index don’t starts with 0 rather with 1. In above example first element will be 1 and last 10.

Having only one element between the square brackets indicates that you are using a one-dimensional array. If you want to have a multi-dimensional array, use a comma-separated list between the brackets, as follows:

SalesAmount: array[6,9] of Integer;

To access an element in an array, use the array element syntax:

SalesAmount[5,3] := 0;

Lists

The List data type can be compared with an array. The List type can only be used with fundamental types and represents a strongly typed list of values that can be accessed by index.

Therefore, you can have a List type of [Integer], but you cannot have a List type of [Blob].

List data type doesn’t require you to define how many elements you want to store up front (while an Array data type does).

The List data type has some methods that are used frequently. The methods that are available for a List data type will discuss in a later post.

To create a list, use the following code:

CustomerNames: List of [Text];

To access an element in a list, use the following methods:

To store/add values to list

CustomerNames.Add(‘KSD Consultancy’);

CustomerNames.Add(‘Microsoft India’);

CustomerNames.Add(‘Ashwini Tripathi’);

To retrive values from list

CustomerNames.Get(1);

Dictionary

The Dictionary data type represents a collection of keys and values.

Every key that you create in this dictionary must be unique. The main benefit is that you can immediately get the value for a specific key.

The value can be a type, but it can also be a List or another Dictionary data type.

Blow code sequence will give you idea how to use dictionary data type:

//Declaring List

CustomerNamesIN: List of [Text];

CustomerNamesUS: List of [Text];

CustomerNamesCA: List of [Text];

//Declaring Dictionary

CountryWiseCustomer: Dictionary of [Code[20], List of [Text]];

//Assigning values to List

CustomerNamesIN.Add(‘KSD Consultancy’);

CustomerNamesIN.Add(‘Microsoft India’);

CustomerNamesIn.Add(‘Ashwini Tripathi’);

CustomerNamesUS.Add(‘Paul’);

CustomerNamesUS.Add(‘Linda’);

CustomerNamesCA.Add(‘Eddy’);

CustomerNamesCA.Add(‘Mark’);

//Assigning values to Dictionary

CountryWiseCustomer.Add(‘IN’,CustomerNamesIN);

CountryWiseCustomer.Add(‘US’,CustomerNamesUS);

CountryWiseCustomer.Add(‘CA’,CustomerNamesCA);

//Retrieving value from Dictionary

CountryWiseCustomer.Get(‘IN’).Get(1);

Here is the complete code:

Created new codeunit and declared variables & procedures to manipulate values in Collections.

Added Code to call procedures defined in codeunit, to assign and retrieve values from collections.

Now its time to check output of above code.

Hope you get idea how to work with Collections, you may find more posts in coming days where we may discuss about methods available for collection.

Development Tips, Excel, How To, Jet Reports, Office Integration, Report

Creating Simple List Report in Excel Using Jet Reports Part-2

In my previous post we saw how to create simple report in excel using Jet Report.

If not seen please refer it before you continue with this post, here is the link for same:

Creating Simple List Report in Excel Using Jet Reports Part-1

Using NL Lookup Part-1

Here we will start from where we left in previous post.

We will add one more sheet in Report we created in our previous post, and name it is as Option, where we will define all of our Filters.

Our Option sheet will look as below:
JetSimpleReport-7
Here we have created 3 Filters Customer No., Credit Limit LCY & Balance LCY.

Next Step will be to apply this Filter provided by user at runtime to the Report.

Return to your Report Sheet and edit the NL Function used to retrieve Rows from Customer as below:
JetSimpleReport-8
(*) in filter denotes all, in other words no Filter.

Now let see the Filter Sheet how it behaves when we run the report.

When we run the report first Report option is shown, where we will give our Filters:
JetSimpleReport-9

Here I am giving below filters:

Customer No. Filter                         *              Include All Customers

Credit Limit (LCY) Filter                  0              All rows with Credit Limit as Zero

Balance (LCY) Filter                      >0             All rows with Balance value greater than Zero

The output of the report should be as below:

JetSimpleReport-10

Stay tuned for more details in my future posts.

I will explain more about commands, filters, functions, lookup etc.…

Development Tips, Excel, How To, Jet Reports, Office Integration, Report

Creating Simple List Report in Excel Using Jet Reports Part-1

Dear friends I will discuss today simple report creating in Jet Reports.

I will take a simple example for creating Customer List showing the Credit Limit & Balances.

We will be using two basic Functions of Jet Reports NL & NF.

Then we will add few more features in my next post on this report.

Let’s Start Step wise Step:

Step 1: Add NL Function to retrieve Records from Customer Table.
JetSimpleReport-1
I have Add NL Function in Cell E5 as shown above, if want to add using Jfx – NL place a Cursor in E5 and press NL from Jfx Group of functions and fill as below:
JetSimpleReport-2

Step 2: Add Fields which you wish to include in your Report using NF Jfx Function.

I am adding No. field from Customer Table.

Here we have already created the connection to Customer Table in previous Step. This will retrieve all Fields and Records from the Customer Table.

Using NF function I am selecting the Fields of which we want to show/include value in our Report.

I have add the Function in Excel as shown below:
JetSimpleReport-3
I have Add NF Function in Cell F5 as shown above, if want to add using Jfx – NF place a Cursor in F5 and press NF from Jfx Group of functions and fill as below:
JetSimpleReport-4

Step 3: Following Step 2 add all other Fields.

The Excel should look as below:
JetSimpleReport-5

I have Added fields No., Name, Credit Limit (LCY), Balance (LCY).

I have also added Heading for these fields, and applied general Excel Formatting.

The Column E with NL function, I have Hide from the Report Output as the information is having no relevance showing to User.

Now we are god to see the output of our Report Created above. Output format of this report will be as below:
JetSimpleReport-6

Stay tuned to have more updates in my upcoming posts.

Development Tips

How to list Virtual Tables in Navision

You may have seen several posts listing the Virtual tables. Most of they say you create page/form and type in one by one table id in Range (2000000001.. 2000000200) and find the Virtual Tables and note them.

Today I will demo you easy way for getting this list with no additional efforts.

You will get below table list in every posts. I have listed tables below in Nav-2015.

Object Designer Virtual Itself from Virtual Table
Type ID Name   Object Type Object ID Object Name
Yes Table 2000000001 Object
1 2000000004 Permission Set Table 2000000004 Permission Set
1 2000000005 Permission Table 2000000005 Permission
1 2000000006 Company Table 2000000006 Company
Yes Table 2000000007 Date
Yes Table 2000000009 Session
Yes Table 2000000020 Drive
Yes Table 2000000022 File
Yes Table 2000000026 Integer
Yes Table 2000000028 Table Information
Yes Table 2000000029 System Object
Yes Table 2000000038 AllObj
Yes Table 2000000039 Printer
Yes Table 2000000040 License Information
Yes Table 2000000041 Field
Yes Table 2000000043 License Permission
Yes Table 2000000044 Permission Range
Yes Table 2000000045 Windows Language
Yes Table 2000000048 Database
Yes Table 2000000049 Code Coverage
1 2000000053 Access Control Table 2000000053 Access Control
Yes Table 2000000055 SID – Account ID
Yes Table 2000000058 AllObjWithCaption
Yes Table 2000000063 Key
1 2000000065 Send-To Program Table 2000000065 Send-To Program
1 2000000066 Style Sheet Table 2000000066 Style Sheet
1 2000000067 User Default Style Sheet Table 2000000067 User Default Style Sheet
1 2000000068 Record Link Table 2000000068 Record Link
1 2000000069 Client Add-in Table 2000000069 Client Add-in
1 2000000071 Object Metadata Table 2000000071 Object Metadata
1 2000000072 Profile Table 2000000072 Profile
1 2000000073 User Personalization Table 2000000073 User Personalization
1 2000000074 Profile Metadata Table 2000000074 Profile Metadata
1 2000000075 User Metadata Table 2000000075 User Metadata
1 2000000076 Web Service Table 2000000076 Web Service
1 2000000078 Chart Table 2000000078 Chart
1 2000000079 Object Tracking Table 2000000079 Object Tracking
1 2000000080 Page Data Personalization Table 2000000080 Page Data Personalization
1 2000000100 Debugger Breakpoint Table 2000000100 Debugger Breakpoint
Yes Table 2000000101 Debugger Call Stack
Yes Table 2000000102 Debugger Variable
Yes Table 2000000103 Debugger Watch Value
1 2000000104 Debugger Watch Table 2000000104 Debugger Watch
1 2000000110 Active Session Table 2000000110 Active Session
1 2000000111 Session Event Table 2000000111 Session Event
1 2000000112 Server Instance Table 2000000112 Server Instance
1 2000000114 Document Service Table 2000000114 Document Service
1 2000000120 User Table 2000000120 User
1 2000000121 User Property Table 2000000121 User Property
1 2000000130 Device Table 2000000130 Device
Yes Table 2000000135 Table Synch. Setup

All marked as Yes in above table under Virtual column are all the Virtual Tables.

I have not type one by one in the Page/form to get this list.

The Virtual table itself in Navision lists the Virtual tables in Navision. List can be different depending on the Version of Navision you see them.

Today I will share you smart way of finding this list of Virtual tables.

Next time you need not to do so hard work to list all the Virtual tables.

Here too you need to create a list page but you will not be required to key in the id of tables one by one, in fact only one table id which will give answers to your query.
VirtualTables-1
Save and execute your Page/Form.

VirtualTables-2
Now go to object Designer. Copy all the tables with id in range defined above and paste in Excel.

Copy above table list in Excel side by side and compare as above table shown in beginning of the post. All those which don’t match are your Virtual tables.

So easy, if anything is available why to waste effort for same.

It always good to share what you know with community, by this way we keep learning from each other.

Stay tuned for many such Tips.

Development Tips

How to create a certificate revocation list for the root certification authority

To start with this exercise you need to first create certificate, if not yet created refer to previous post.

Previous Step Link- How to create a root CA and a private key file by using the makecert.exe utility

Let’s start with this exercise:

  • On the computer running Microsoft Dynamics NAV Server, create a temporary folder to use when you work with certificates.
  • Open the command prompt as follows:
    • If you have Visual Studio installed on your computer, choose Start, choose All Programs, choose Microsoft Visual Studio 2012, choose Visual Studio Tools, and then right-click Visual Studio Command Prompt and choose Run as Administrator.
    • If you have the Windows SDK installed on your computer, choose Start, choose All Programs, choose Microsoft Windows SDK, and then right-click Windows SDK Command Prompt (2010) (or CMD Shell) and choose Run as Administrator.
  • At the command prompt, locate the temporary directory.
  • At the command prompt, type the following command:

makecert -crl -n “CN=RootNavServiceCA” -r -sv RootNavServiceCA.pvk RootNavServiceCA.crl

  • When you are prompted, enter the password that you used to create the root CA.

Certificate-9
The RootNavServiceCA.crl certificate revocation file is saved in your temporary folder.
Certificate-10
Now we will install the certificate revocation list on the computer running Microsoft Dynamics NAV Server

  • In the Certificates snap-in, in the left pane of MMC, expand the Certificates (Local Computer) node.
  • Expand the Trusted Root Certification Authorities node, right-click the Certificates subfolder, select All Tasks, and then choose Import.
  • In the Certificate Import Wizard, on the Welcome page, choose Next.
  • On the File to Import page, choose Browse.
  • In the File Type field, select Certificate Revocation List (*.crl).
  • Browse to the location of the RootNavServiceCA.crl file, select the file, and then choose Open.
  • On the File to Import page, choose Next.
  • On the Certificate Store page, accept the default selection, and then choose Next.
  • On the Completing the Certificate Import Wizard page, choose Finish.

Certificate-11

  • Select the Trusted Root Certificate Authorities node, and then refresh the snap-in.

A Certificate Revocation List folder that contains the RootNavServiceCA.crl file has been created.
Certificate-12
In next step we will now create and install a test certificate on computer running Microsoft Dynamics NAV Server.

Next Step Link- How to create and install a test certificate for the Microsoft Dynamics NAV Server computer

Cumulative Updates

List of Cumulative Updates for Microsoft Dynamics NAV 2015 as of July 2015

Knowledge Base ID Title Release date Build no. Local versions included
3075726  (https://support.microsoft.com/kb/3075726/ ) Cumulative Update 9 for Microsoft Dynamics NAV 2015 July, 2015 41779 AT, AU, BE, CH, CZ, DE, DK, ES, FI, FR, IS, IT, NA, NL, NO, NZ, RU, SE, UK
3069272  (https://support.microsoft.com/kb/3069272/ ) Cumulative Update 8 for Microsoft Dynamics NAV 2015 June, 2015 41370 AT, AU, BE, CH, CZ, DE, DK, ES, FI, FR, IS, IT, NA, NL, NO, NZ, RU, SE, UK
3058000  (https://support.microsoft.com/kb/3058000/ ) Cumulative Update 7 for Microsoft Dynamics NAV 2015 May, 2015 40938 AT, AU, BE, CH, CZ, DE, DK, ES, FI, FR, IS, IT, NA, NL, NO, NZ, RU, SE, UK
3052226  (https://support.microsoft.com/kb/3052226/ ) Cumulative Update 6 for Microsoft Dynamics NAV 2015 April, 2015 40459 AT, AU, BE, CH, CZ, DE, DK, ES, FI, FR, IS, IT, NA, NL, NO, NZ, RU, SE, UK
3039824  (https://support.microsoft.com/kb/3039824/ ) Cumulative Update 5 for Microsoft Dynamics NAV 2015 March, 2015 40262 AT, AU, BE, CH, CZ, DE, DK, ES, FI, FR, IS, IT, NA, NL, NO, NZ, RU, SE, UK
3035986  (https://support.microsoft.com/kb/3035986/ ) Cumulative Update 4 for Microsoft Dynamics NAV 2015 February, 2015 39663 AT, AU, BE, CH, CZ, DE, DK, ES, FI, FR, IS, IT, NA, NL, NO, NZ, RU, SE, UK
3024901  (https://support.microsoft.com/kb/3024901/ ) Cumulative Update 3 for Microsoft Dynamics NAV 2015 January, 2015 39368 AT, AU, BE, CH, CZ, DE, DK, ES, FI, FR, IS, IT, NA, NL, NO, NZ, RU, SE, UK
3020885  (https://support.microsoft.com/kb/3020885/ ) Cumulative Update 2 for Microsoft Dynamics NAV 2015 December, 2014 38798 AT, AU, BE, CH, DE, DK, ES, FI, FR, IS, IT, NA, NL, NO, NZ, RU, SE, UK
3013215  (https://support.microsoft.com/kb/3013215/ ) Cumulative Update 1 for Microsoft Dynamics NAV 2015 November, 2014 38457 AT, AU, BE, CH, DE, DK, ES, FI, FR, IS, IT, NA, NL, NO, NZ, RU, SE, UK
Report

Creating my first Word List Report in Navision 2015

Today we will learn creating Word List Report in Navision 2015.

Prepare the Dataset for Report as below, to keep it simple I am creating List report for Item Inventory.

I am adding one additional field for Company Logo from Company information.

Make sure you add calcfields code for Picture from Company information.

—————————————————

I have added below piece of code in [ Item – OnPreDataItem() ]

CompInf.GET;
CompInf.CALCFIELDS(Picture);

—————————————————

Word Report Design 1

Place the cursor on Blank Line and open Report Properties and add DefaultLayout Property.

Word Report Design 2

Next we will Add a Blank Word Layout to the Report, Step as below.

Word Report Design 3

Confirm the action by responding OK to the Dialog Box.

Word Report Design 4

Now Export this Blank Template

Word Report Design 5

and save as docx file (MS Word File)

Word Report Design 6

Open the Exported Template in Word.

Click on DEVELOPER Menu.

From Ribbon click on XML Mapping Pane.

Word Report Design 7

You will now be able to see XML Mapping Pan which contains your Dataset for the Report.

Click to the Dropdown List and select entry containing your Report Name & ID.

Word Report Design 8

Now you will be able to access your Dataset with Table & Fields details. As shown in below screen.

Word Report Design 9

Place the cursor on top (or wherever desired) of the document to add Logo to the Report.

Select the Picture Filed from the Dataset -> Right Click -> Insert Content Control -> Picture.

See below screen for details:

Word Report Design 10

You will see the Place holder for the Picture.

Now add Table with 2 Rows ( 1 for Header & 1 for Data) and 6 columns.

We have six columns in our dataset excluding Logo.

Word Report Design 11

Add your Header for the table, We are using fixed Text Heading as of now but you can add captions from your dataset.

In current report I have not included we can check same in some other report posts.

Word Report Design 12

Select Entire 2nd Row and Add Repeating Content Control for Item (Table).

As this will show records from the table Item we included in our Dataset.

Word Report Design 13

Now in each column add your columns from Dataset as shown below.

Place your cursor in each column and choose Insert Content Control -> Plain Text.

Word Report Design 14

Now our Report is almost ready.

May be the Report have data which may continue on several pages, in this case our Heading Row must Repeat on every new Page. To do this we will Select the entire 1st Row -> Right Click -> Table Properties.

Go to Row Tab of Property window and put a checkmark on option “Repeat as header row at the top of each page

Word Report Design 15

Save your Word Template an Import back in your report as shown below.

Word Report Design 17

Now Save the Report and Execute it.

Here is the Output below of the Report.

Word Report Design 16

We are done !!!

You can use formatting feature of Word to add more better look to your Report as desired.

Stay tuned for more in upcoming posts.

Don’t forget to follow the Blog Site for future posts.