Skip to main content

ForNAV Tips Part 6: How to Update Converted Business Central Reports

This is the last of a six-part series discussing how businesses using Microsoft Dynamics 365 Business Central can analyze their financial health by leveraging ForNav tools to streamline reporting processes for generating key performance indicators. In this article, we discuss making updates to reports directly through the ForNAV report designer tool. 

 

Using the ForNAV Designer reporting tool is a little bit more complex than making changes via Custom Report Layouts. But there are advantages, and indeed it is sometimes even necessary to go this route.

There are at least two reasons to make changes directly through the report designer tool:

  1. To permanently adjust the report layout object
  2. To add/modify fields or the report logic

 

For this article, we will focus on #2.

Let’s assume your converted report works fine, but you want to add a field to the report header. Unfortunately, even if you modify the report dataset by adding a new field, you will not have access to any new fields until you have directly accessed the new dataset through the ForNAV designer. In other words, you cannot publish a change to the dataset and then add a new field using custom report layouts. That would be nice, but unfortunately, that’s simply not how it works. 

 

A Tip to Save You Time

It actually took me quite some time to figure out that it’s impossible to publish a change to the dataset and then add a new field using custom report layouts. After spinning my wheels for several days, I finally contacted ForNAV support, and they informed me of this rule. So hopefully, by reading this article, you will save the time that I lost in this area!

 

To illustrate what I am talking about, let’s review a very simple example where you want to add a text label to the header of your report:

 

 

To begin, you must update your dataset with the new label. Let’s open up [VS Code] and navigate to the report object:

 

Now go to [reports global variables] and create a new label called [TextForNAV]. You can define it any way you want; in this case, mine says [This is my test ForNAV report].

 

 

Next, add the label as a column on your report. For a [Sales Order] report, you generally want to create this column under the [PageLoop dataitem], where the rest of the header columns are located:

 

With that done, you can now edit your layout. To open a layout using ForNAV Designer, start by opening the designer itself:

 

And if you happen to be greeted by this screen…

 

…you can either click the red [X] in the top right to close it, or you can click [Open report from File]. If you decide to close it, once the designer fully opens, click on [Open] then [Open Report from File]:

 

This allows you to designate which report you want to design. Next, navigate to your new [Sales Order] report. Be sure to use the [.al] file, not the [layout] file. Then open it up:

 

Now you are officially in the report designer!

 

 

To add your new label, first find it by clicking the [Field List] tab over on the right side of the designer:

 

Next, expand [DynamicsNavDataSet] to reveal all available report columns. If you scroll toward the bottom of the list, you will see your new label. Everything is in alphabetical order, which makes it easy to track things down:

 

Now that you found your label, simply drag and drop it onto the report: 

 

Notice in this example, I bolded my control with a bright blue font. You can format yours however you choose. Hit the save button in the upper-left corner and exit the designer. You are all done here!

 

Using New Report Layouts

Now that you are finished with your change, you can package and install the app in your cloud database. Refer to the ForNAV Tips Part 4 article of this series—How to Implement Business Central Reports in AL Projects—if you need a refresher on how to accomplish this. 

Once the revised app is installed, you can navigate to [ForNAV] then [MyReports]. Since you have modified the report’s base layout, the custom layout you created earlier is now superseded and can no longer be used. Well…it can…but it won’t contain the change you just made to your layout. 

To use the new layout, hit the [Layout] button and select [Custom Layouts]:

 

Select the [Built-in Layout] and hit the [Activate] button. This tells the system to use the base layout and to ignore the custom layout you created earlier:

 

Run the report:

 

As you can see, your custom field has been added. You may also notice that the formatting changes you added in our last article (ForNAV Tips Part 5: How to Use Custom Report Layouts to Update Business Central Reports) are no longer present. And the report is once again skewing to the left and the logo is too big.

That’s to be expected since you reverted to the base layout, which did not include those changes. If you want to re-add those formats, you can easily do so by once again working with Custom Report Layouts.  Simply delete the existing custom layout that you created in the last article:

 

Next, design the report using your new and improved layout. Then, reimplement the necessary formatting adjustments and finally, re-run the report.

Voilà!

You now have your new text label—along with all of the original formats from the previous article:

 

 

Need More Help?

This concludes our series on converting and designing Business Central reports with ForNAV. We certainly covered a lot of ground, I hope the information in this article series proves helpful.

Best of luck as you convert your reports, and as you take your journey, if you have any questions about Business Central or ForNAV, I will be glad to help. Feel free to reach out to contact us

About the Author

With a focus on the technical and functional aspects of Dynamics 365 Business Central, Justin Arnold has worked for Western Computer since 2016.

Profile Photo of Justin Arnold