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

Using NL( Lookup ) in Jet Reports Part-3

We have discussed regarding Lookup in my previous post. If you missed can find link here.

Using NL( Lookup ) in Jet Reports Part-1.

Using NL( Lookup ) in Jet Reports Part-2.

Continuing with more advanced usage I am here below.

Another useful feature of the NL(“Lookup”) function is the ability to specify how many records Jet Reports will go through in order to create a list of values.

By default, Jet Reports uses the value that is set for Maximum Lookup Records Scanned on the Jet Reports Options form. The default is 1,000 records. If the number of desired records to be searched is larger than this setting, the “ScanLimit=” keyword can be utilized.

To apply a scan limit, “ScanLimit=” must be placed in one of the FilterField parameters and then the desired number of records to be searched will be placed in the associated Filter parameter.

To create a Lookup function that will return all of the G/L Account Numbers in the first 5,000 records of a G/L transaction table, the function would look like this:

=NL(“Lookup”,”G/L Entry”,”G/L Account No.”,”ScanLimit=”,”5000”)

The NL(“Lookup”) function normally returns all values (for the particular field) that are present in the table specified.  For fields defined in NAV as “Option” fields, it may sometimes be desirable to display *all possible* value – regardless as to whether those values are present in the table or not.  For this, a useful feature is the “SmartLookup=” option (available in Jet Essentials 2012 R2 and later).

For example, the function:

=NL(“Lookup”,”Item Ledger Entry”,”Entry Type”)

Might provide a Lookup window that may not list all options depending upon data in the table.

By adding the “SmartLookup” option we could get a list of all options defined as option to that field.

 =NL(“Lookup”,”Item Ledger Entry”,”Entry Type”,”SmartLookup=”,”TRUE”)

Lookup-10

Stay tuned for more details in my upcoming posts

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

Using NL( Lookup ) in Jet Reports Part-2

We have discussed regarding Lookup in my previous post. If you missed can find link here.

Using NL( Lookup ) in Jet Reports Part-1.

I am continuing with more advanced usage here below.

In some instances it is also desirable to base the values that are displayed in one NL(“Lookup”) function on the results that were selected in another NL(“Lookup”) function.

An example of this could exist in a Sales Report. The viewer will have the ability to select a Salesperson Code to run the report for, and will also be able to specify Customer Numbers in order to filter the report further.

If only one Salesperson Code is selected, however, it may be undesirable to display Customer Numbers that are associated with other Salesperson Codes.

In this instance, two NL(“Lookup”) functions will be used, with the Customer Number filtered by the Salesperson Code so that the values are related. The first NL(“Lookup”) function, which will allow the selection of the Salesperson Code, will look like this:
Lookup-6

Lookup-7

The next NL(“Lookup”) function will give the viewer the ability to select from a list of Customer Numbers, but it will be filtered based on the Salesperson Code that was previously selected. This is done but inserting a normal filter into the function and referencing the cell containing the Salesperson Code that was previously selected by the viewer.

This addition would make the report look like this:
Lookup-8
After selecting Salesperson Code Filter when we open Customer List it will show lookup as below:
Lookup-9

Customer List is filtered out with Salesperson Code we selected using Salesperson List Lookup.

Will come up with more details in my upcoming post, stay tuned for more details.

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

Using NL( Lookup ) in Jet Reports Part-1

The NL(“Lookup”) function can be used to provide Lookup to the Users so that he can select from a specified list of values when setting their report filters. This will allow them to see the list of options available to them in regards to a particular report filter.

The most common (and basic) use of the NL(“Lookup”) function is to simply pull a list of values from the database.

For example, if a list of customer numbers (“No.”) from the “Customer” table is desired then the function would look something like this:

=NL(“Lookup”,”Customer”,”No.”)

The resulting lookup that the user sees would be:

Lookup-1

It is also possible to allow the user to see more than one value from a particular table. This can help the user to make a choice more easily by displaying additional details about the values returned.

Multiple fields can be displayed by placing them in an array. This is accomplished by placing the list of fields to be displayed, separated by commas, in the Field parameter and surrounding it with curly braces.

If the fields to be shown are the “Name” and the “Country/Region Code” associated with each customer “No.”, the resulting function would look something like this:

=NL(“Lookup”,”Customer”,{“No.”,”Name”,”Country/Region Code”})

The resulting lookup would be:

Lookup-2

NOTE: The first field in the array is the field that will be returned by the Lookup form.

In addition to selecting multiple fields to be displayed in the list, it is also possible to customize the headers, that appear at the top of the Lookup window. This can be done by placing “Headers=” in one of the FilterField parameters of the NL(“Lookup”) function.

For example, instead of the field names appearing as “No.”, “Name”, and “Country/Region Code”, it has been decided that they should be displayed as “Cust. No.”,”Cust. Name”, and “Cust. State” to the user.

To do this, “Headers=” will be added in one of the FilterField parameters, and the desired names will be placed in the associated Filter parameter. The function should look like this:

=NL(“Lookup”,”Customer”,{“No.”,”Name”,”Country/Region Code”},”Headers=”,{“Cust. No.”,”Cust. Name”,”Cust. State”})

The resulting Lookup window would now appear as:

Lookup-3

In addition to returning a list of values from the database, it is also possible to manually specify the values that will be returned.

This allows you to present the user with a list of values that are not stored in your database. The syntax that will be used is slightly different. Since data is no longer being returned directly from the database, the Table parameter is no longer used to specify the table that the information will pull from. Instead, an array containing the values to be displayed is placed in the Table parameter of the Lookup function. The Field parameter will then contain the list of column headers of the Lookup window.

To create an NL(“Lookup”) function that will display “East”, “West”, “North”, and “South” for Directions, the function will be:

=NL(“Lookup”,{“East”,”West”,”North”,”South”},”Direction”)

The resulting lookup window would now be:
Lookup-4
NOTE: It is important to place the field name that will be displayed at the top of the Lookup window (in this example “Direction”) in the Field parameter. Omitting this will not display any values in the Lookup Window.

In addition to placing the values in the NL(“Lookup”) function itself, a cell reference can also be used. The following example will display the exact same result as the previous example, but the values are specified by a cell reference instead of text.

It is also possible to display multiple columns in the Lookup Window by utilizing cell references. To achieve this, another column of values will need to be inserted next to the values that we are already displaying. Once this is done, the cell reference in the NL(“Lookup”) function will also need to be expanded to encompass both columns of data. Since multiple columns are now being specified, names for these columns will also need to be defined in the NL(“Lookup”) function as well. This is done by using the array syntax that was described above in order to specify the field names in the Field parameter, in this case “Direction” and “Description”.

=NL(“Lookup”,F5:G8,{“Direction”,”Description”})

Below is an example of what this would look like:

Lookup-5

Will come up with more details in my next post on this.

Stay tuned for more details in my upcoming post.

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, Excel, How To, Jet Reports, Office Integration, Report

Creating My First Report Using Jet Reports

Today I will discuss, how to create reports in Excel using Jet Reports.

Below links will be helpful to refresh what I have shared till now:

Installing Jet Express for Excel – Navision 2015

Installing and Publishing the Jet Business Objects on the Microsoft Dynamics Server

Publishing the Jet Data Source Codeunit to the Web Service

Enable SOAP Services and identify connection parameters

Configuring a Data Source in Jet Express

Using Jet Report NL Function

Using Jet Report NF Function

Using Link in Jet Reports

We will be using NL Functions.

Also we will introduce few Arguments for NL Function.

Below Table describes the same:

Parameter Argument Description
What
“Link” Returns a string value that can be used as a filter in another NL function
“LinkField” Returns a string used to retrieve a field from a link table in an NL(Table) function.
“Table” Creates an Excel table object based on the field values returned. Leaving the Field argument blank returns all fields. Use a Field Cache to return multiple fields.
FilterField
“Headers=” Overrides field headers with the array of headers specified by the Filter argument. For use with an NL(Table) or NL(Lookup) function.
“TableName=” Specifies the name to use for the Excel table object created by NL(Table) with the name in the Filter parameter. Use this to refer to the table by name from a Pivot table.
“Filters=” Specifies a set of filters for the query with an array of filters specified by the Filter argument.
“InclusiveLink=” Links the primary table to the one specified by the Filter argument for the purpose of retrieving data.
“IncludeDuplicates=” When the value of the Filter argument is TRUE, specifies that all matching records from the source data will be included in the NL(Table) results.

We will design below report to see how Jet Report is designed.
FirstJetReport-1

Below describes the Formulas need to be inserted in respective cells.

Make sure you add ‘=’ in front of Formulas as defined in Data Type Column.

Cell Reference Formula Data Type
F10 NL(“Link”,”Item”,,”No.”,”=Item No.”) Formula
G10 NL(“Link”,”Customer”,,”No.”,”=Source No.”) Formula
F11 Entry No. Text
G11 Document No. Text
H11 Posting Date Text
I11 Item No. Text
J11 Item – Description Text
K11 Gen. Prod. Posting Group Text
L11 Customer No. Text
M11 Customer   Name Text
N11 Item Ledger Entry Quantity Text
F12 Entry No. Field Names
G12 Document No. Field Names
H12 Posting Date Field Names
I12 Item No. Field Names
J12 NL(“LinkField”,”Item”,”Description”) Formula
K12 NL(“LinkField”,”Item”,”Gen. Prod. Posting Group”) Formula
L12 Source No. Field Names
M12 NL(“LinkField”,”Customer”,”Name”) Formula
N12 Item Ledger Entry Quantity Field Names
E13 NL(“Table”,”Value Entry”,$F$12:$N$12,”Headers=”,$F$11:$N$11,

“TableName=”,”ValueEntry”,”Filters=”,$C$5:$D$8,”InclusiveLink=”,$F$10,

“InclusiveLink=Value Entry”,$G$10,”IncludeDuplicates=”,”True”)

Formula

Although you can directly key in the text for NL commands and functions as formula. Below I show the Function Wizards for better understanding and how to use the same. All marked as Formula in above Table.

For Rest marked as Text or Field Names, you can key them directly in respective cells.
FirstJetReport-2
FirstJetReport-3
FirstJetReport-4
FirstJetReport-5
FirstJetReport-6
FirstJetReport-7

The output of Report will as below:
FirstJetReport-8

Stay tuned for upcoming posts for more detailed information.

I understand above example is bit complex I will come up with more simple and basic reports for beginners in my upcoming posts.

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

Using Link in Jet Reports

LINK gives users advanced filtering capabilities in Jet Essentials.

Using LINK allows users to tie together information from different tables.

LINK is available for all connector types.

Recall from my previous post where I introduced with NL Function, you can find the Link here.

Since Link is used in Combination with NL Function so recalling it is necessary here, if you have not seen the previous post please follow the link above to understand the functionality, before you continue.

Let’s start with simple NL Function usage, later we will see its usage with Link.

The following formula will return the document number for each Sales Invoice Header in the system.

=NL(“Rows”,”Sales Invoice Header”,”No.”)

The following formula will return only sales invoices where the posting date is within a specific data range.

=NL(“Rows”,”Sales Invoice Header”,”No.”,”Posting Date”,”>1/1/2009″

LINK can be used to filter on a field that is not in the Sales Invoice Header table (such as the “Type” field in the Sales Invoice Line table) as follows:

=NL(“Rows”,”Sales Invoice Header”,”No.”,”Posting Date”,”>1/1/2009″,”LINK=”,”Sales Invoice Line”,”Document No.”,”=No.”,”Type”,”Item”)

UsingLink-1

In this example, we used LINK= and specified the Sales Invoice Line table because this is where the “Type” field that we want to filter exists. We linked to the Sales Invoice Header by specifying that the “Document No.” Field on the Sales Invoice Line matches the “No.” field on the Sales Invoice Header.

We then specified the “Type” filter on the Sales Invoice Line table.

Please note that some relationships between tables may require more than a single field to define the link:

=NL(“Rows”,”Purch. Rcpt. Line”,,”Link=”,”Purch. Inv. Line”,”Document No.”,”=Order No.”,”Line No.”,”=Order Line No.”,”Posting Date”,”>1/1/2010″)

Nested Linking

LINK statements can be combined to fulfil more complex filtering requirements.

For example, assume that you would like to see the territories with sales during a given period.

A simple formula could be used if the territory is available on the table that contains the historical sales information and if you wanted the territory assignment at the time that the sale was made.

If, on the other hand, the territory is not available, or you want the currently assigned territory, you can do this by combining LINK statements as follows:

=NL(“rows”,”Country/Region”,”Code”,”Link=”,”Customer”,”country/Region Code”,”= Code”,”Link=”,”Sales Invoice Header”,”Sell-to Customer No.”,”=No.”,”Posting Date”,”>1/1/2010″)

In this example we linked the Country/Region to the Customer and the Customer to the Sales Invoice Header. Then we filtered by the “Posting Date” field to get Country/Region with sales for a specific period.

Linking Multiple Tables

LINK statements can also be combined to handle situations where a single table is linked to multiple tables.

For example, want to see Sales Invoices where the Country/Region Code is “AE” and the Vendor is “30000”.

To do this we can link from the Sales Invoice Line table to the Customer table with the “field filtered for “AE” and, in addition, link from the Sales Invoice Line table to the Item table with the “Vendor No. filtered for “30000”.

=NL(“Rows”,”Sales Invoice Line”,,”Type”,”Item”,”Link=”,”Customer”,”No.”,”=Sell-to Customer No.”,”Country/Region Code”,”=AE”,”Link=”,”Item”,”No.”,”=No.”,”Vendor No.”,30000)

Note that the Link statements include the primary table (Sales Invoice Line) which indicates that links should restart from the primary table rather than linking in the nested fashion demonstrated in the previous section. It is possible to mix these models and have multiple links as well as nested links.

One other thing to note is that filters applied to the primary table (like the filter on the “Type” field in this example) should occur before any LINK statements.

NL(“Link”)

The NL(Link) function can be used to specify linked tables when more than 10 parameters are needed for a linking statement.

This example formula was used in the nested link section and links from the Country/Region table to the Customer table and then from Customer table to the Sales Invoice Header table.

=NL(“Rows”,”Country/Region”,”Code”,”Link=”,”Customer”,”Country Region Code”,”=Code”,“Link=”,”Sales Invoice Header”,”Sell-to Customer No.”,”=No.”,”Posting Date”,”>1/1/2009”)

Enter in Excel Sheet Below Formula:

[Cell E4] =NL(“Rows”,”Country/Region”,”Code”,”Link=”,F4)

[Cell F4] =NL(“Link”,”Customer”,,”Country/Region Code”,”=Code”,”Link=”,G4)

[Cell G4] =NL(“Link”,”Sales Invoice Header”,,”Sell-to Customer No.”,”=No.”,”Posting Date”,”>1/1/2010″)

UsingLink-2

Explanation as below:

UsingLink-3

When we execute the Report Output will be as below:

UsingLink-4

Stay tuned for more details in my Upcoming posts.

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

Using Jet Report NF Function

In my previous post I have explained usage of NL Function, if not seen please check this Link.

The NL function works great if you want a single field from a record, but if you want to retrieve more than one field from the same record, retyping all the filters for each field can be tedious.

The NF function is a shortcut that will return the value of a field in a record. One or more NF functions can be used with a single NL function that has the NL field parameter left blank.
NFFunction-1
NFFunction-2
Similarly we can enter Formula in other cells:
NFFunction-3
The output of Above Report will be as below:
NFFunction-4
You need to press Report or Refresh Button on the Ribbon to view the output of the Report.

If we see in above output column D is not having any valid information for reporting point of view so we can Hide them. Also Colum Headings will add more meaning full information. Let’s do some Formatting to the Report too.

To Return to Designer mode you need to press Design button on Ribbon.
NFFunction-5
The First Row & First Column is reserved for Jet Commands, so don’t use for your data purpose.

The A1 cell is auto populated when you run the Report First time.

The Hide in D1 instructs Jet to Hide this column at Report run.

E3 to G3 I have added the Column Heading for my Data. You can use any Formula or Formatting Supported in Excel.

E5 to G…. is the data area which retrieves the value from database using the Jet Functions.

Let’s See the output of above Report. Press Report or Refresh Button to view the output of the Report or execute the Report.
NFFunction-6
The Report & Refresh button is having different purpose:

Report: Retrieves data from catch, help full in testing report while Designing.

Refresh: Retrieves fresh data from the database, you will get updated data if any between earlier run.

If you closely monitor the Report you will find that the First Row/Column [1] and Column D is hidden from Report output.

If there is no primary key in the table, Jet Reports will give an error message if you leave the Field parameter of the NL blank so you can try leaving the Field blank, then fill in a list of field names if necessary.

See my upcoming posts for more details of NL & NF Functions with more usage.

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

Using Jet Report NL Function

 
Returns fields or record keys from a table based on filters. Duplicates report templates.
 
Note:
If the NL function is making copies of a template, it must be the only function in the cell.
The functions =-NL(“Rows”) and =NL(“Rows”)*-1 are not valid.
 
NLFunction-1
 
Example:

=NL(“Rows”,”Customer”,,”Salesperson Code”,”PS”,”Shipping Agent Code”,”DHL”)

This NL returns the record key for all the Customer with Salesperson Code = ‘PS’ and Shipping Agent Code as ‘DHL’
 
NLFunction-2

If you specify multiple filters, they combine in a logical AND.
 
NLFunction-3

NL Function Parameters & Arguments with brief Description.
 
NLFunction-4
NLFunction-5
NLFunction-6

Navision Cronus NL Function Examples:

This NL that returns the record key for all of the customers in the Customer table who are in the City of Boston with a Balance less than zero

=NL(“Rows”,”Customer”,,”Balance”,”<0″,”City”,”Boston”)

This NL returns the Customer Name from sales quote number 10000. This NL can only return one record so the “What” parameter is blank

=NL(,”Sales Header”,”Name”,”No.”,”10000″,”Document Type”,”Quote”)

This NL returns information for a company other than the default one in the Options screen

=NL(“Rows”,”Customer”,,”0″,”CRONUS USA, Inc.”)

This NL returns information for a company other than the one in the Options screen using a connection other than the default.

=NL(“Rows”,”Customer”,,”0″,”CRONUS USA, Inc.”,”DataSource=”,”2″)

This NL creates sheets called “US”,”CANADA” and “MEXICO” using an array in the table field

=NL(“Sheets”,{“US”,”CANADA”,”MEXICO”})

This NL creates lookup values for use with Report Options for each item in cells F5 through F15.

=NL(“Lookup”,F5:F15,”My Values”)

 

See my upcoming posts for more details and uses of this function.

 

Development Tips, Instalation & Configuration, Jet Reports, Office Integration, Report

Using the Jet Ribbon Jet Essentials 2015 Update 1 for Navision 2015

Jet ribbon in Excel has been modified to make it easier to use.
JetRibbon-1

Some items have been moved so as to provide better grouping of related items.  Other (less-common) items do not display by default.

Additionally, the Function Wizard (“Jfx”) has been replaced by four smaller icons…
JetRibbon-2

which allow you to easily select what type of Jet function you would like to place in your report.

You have a great deal of control over which items appear on the ribbon.  Simply go to the “Jet Ribbon” section of the Jet Essentials Application Settings..
JetRibbon-3

Place a check next to those items you do want on the ribbon and uncheck those that you do not want to see.

Checkout Upcoming posts for more information.