Gantt control add-in for Business Central with AL API - release 6.2

Posted by Juergen Theis on Jul 5, 2022 10:30:19 AM

Today we released a new version of our Visual Scheduling Add-in Developer Toolbox (VSADT). The VSADT is a Gantt control add-in for Microsoft Dynamics 365 Business Central and fully integrates with the ERP system. ISVs use the VSADT in their business solutions to visualize their data in form of an interactive graphical planning board. You develop your individual Gantt chart only by using AL code. 

Let's take a look at what great features the new version 6.2 offers to you. 

Headers and footers for the PDF export

Until now, the PDF export lacked the possibility to add additional information at the top or bottom of the pages. Headers or footers were not provided so far.

Therefore, we have extended the options that can be passed when calling the SaveAsPDF method. There are two ways to create headers and footers.

First, you can use the properties TopText and BottomText of the options. Both allow adding simple texts that can also contain dynamic content such as the current date, the current page number, or the total number of pages. Specific keywords – { { #Date}, { {PageNo} }, { { #PageCount} } – are provided as placeholders for these dynamic elements.

Secondly, to be able to process more complex content and especially to be able to add symbols or images such as logos to the pages, the TopHTML and BottomHTML properties can be used. This way you can design the headers and footers by creating your own HTML code. Here another placeholder – { { @symbolID} } – is available for embedding symbol objects. But of course, you can also use URLs to other image resources located anywhere.

The following figure shows a sample of a page with HTML-designed content at the top and the bottom:



If TopHTML or BottomHTML is used, then the settings for TopText or BottomText respectively are ignored.


More safety and document properties for the exported PDF documents

The PDF specification provides several means to make documents more secure. VSADT now supports the following options that can be passed when calling the SaveAsPDF method:

  • Author
  • Title
  • Subject
  • Keywords
  • Owner
  • Password
  • UserPassword

  • PermissionToAccessContent
  • PermissionToAnnotate
  • PermissionToAssembleDocument
  • PermissionToCopy
  • PermissionToModify
  • PermissionToPrint

For a brief overview, please see (Chapter “Encryption and Access Privileges”).


Predefined groups

Although VSADT has very powerful mechanisms for the visualization of structured data with the creation of hierarchies and grouping, one feature has still been missed by our customers: predefined groups.

Suppose you have production orders that are categorized by the order statuses "released", "planned", and "finished". You can define a representation of these orders grouped by status using the HierarchySupplementaryDefinition object. Let’s further assume that your current data does not contain any order with the status "finished". Unfortunately, no "finished" group has been generated so far in this case.

This is of course a shortcoming, because you cannot, for example, drag an order from one of the displayed groups to a "finished" group. For this, you need at least an empty "finished" group. This is where the new property PredefinedGroups of the HierarchyLevelSupplementaryDefinition object comes into play. The following two figures show a small example and the corresponding JSON snippet of how to apply this property:





Extension of the concept of "suitable objects"

In the Resources View VSADT supports the user in drag & drop interactions by highlighting suitable targets. That is, for each allocation it is possible to define which resource row is a permitted or suitable one. While dragging an allocation, these rows are highlighted, whereas a semi-transparent curtain covers the other rows. In this way, the user can see where he may drop an allocation already while dragging it. Note, that this is only a visual aid for the user. He can still drop an allocation in the "forbidden" area, and it is up to the application to prevent it if desired.

This concept of "suitable objects" has now been extended to include interactions with entities as well as activities as targets for the allocations.

For the entity objects, SuitableActivityIDs and SuitableResourceIDs properties have been added. The next figure illustrates the effect of these properties when dragging entities using the Resources View as an example:


To fully support this concept also for allocations in the Activities View when allocation rows are enabled, allocations now have the property SuitableActivityIDs in addition to the existing SuitableResourceIDs property. And in this case, the colors for covering suitable as well as unsuitable rows can be customized by the new settings PM_Suitable/Un­suitable­ActivityOverlayColor.


Optimized positioning of date line captions

Although the labeling of the date lines was already very flexible so far, there were always conflicts in the presentation of the captions especially when several date lines were displayed close to each other. Then the captions often overlapped.

Such visual conflicts are now resolved by an optimization process that can be enabled by the setting PM_DateLineCaptionOptimizedPositioningEnabled.



And it does not matter whether the texts have a vertical or horizontal orientation:



And even a mix of orientations will be processed:



Enhancements to curves

For the curve area, we have two interesting enhancements.

You can now set a minimum (see curve property ScaleMinimumValue) and a maximum (see curve property ScaleMaximumValue) value for a curve object to be displayed in the numerical scale. This is useful when you would like to force the scale to use specific values for the maximum or minimum instead of the calculated ones to improve readability. For instance, let’s look at a situation where VSADT calculates the tick marks without any intervention as follows:



If we now set ScaleMaximumValue property of the curve to 3, then it looks like that:



And if we additionally set the ScaleMinimumValue to -3, we get:



Another enhancement to curves is the new option pm_linesShownInLoadCurvePanes. This makes it easier for the user to "read" the curves. Pale horizontal auxiliary lines at the level of each tick mark in the numerical scale help him to better estimate the y-values of the curves, even if they are far away from the scale.



Refined coloring of calendar grids

Previously, it was possible to alter the color of only the entire calendar grid using the setting PM_CalendarGridColor.

Now for each activity and each resource object you can define your own grid color (see property PM_CalendarGridColor). The next figure compares a sample for the regular appearance with one that uses grid colors for some resources:



Filtering of rows

Previously, it was possible to make a resource or activity invisible by changing the ParentID property to a value referencing a row object that did not exist. But this was merely a hack and caused performance problems when used with bigger subtrees of row objects.

Now we have implemented the new Boolean property AddIn_Visible that now can make a row object (Activity, Resource, Allocation) invisible in an official way, i.e., filtering a row object out of the view. Internally, we can handle this property with less effort and therefore gain performance. When you use the setting UpdateMode to use differential objects additionally, you can update the property AddIn_Visible with a minimum of data amount sent from the page on the server to VSADT on the client.

Visual Scheduling Add-in Developer Toolbox TEST NOW


Further readings

VSADT release 6.1

VSADT release 6.0

VSADT release 5.3

VSADT Release 5.2

VSADT Release 5.0


Topics: Dynamics NAV Visual Scheduling Add-in, Business Central Visual Scheduling Extensions, Business Central Visual Scheduler Toolbox