Business central blog
Subscribe to blog and get news about new posts.

Why Word reporting can't compete with RDLC in Business Central?

Recently, Microsoft has been doing a lot to improve Word reporting. However, Word reporting is still lagging behind, and many developers prefer working with RDL/RDLC. So, what is Word lacking, and can it ever become a viable reporting system? A logical question also arises: why put so much effort into improving Word when RDLC could be enhanced instead? I will attempt to answer these and other questions in this post.

Agenda

RDL and RDLC are standard formats for SQL Report Services. RDL stands for "Report Definition Language" and is an XML format for reports used both locally and for uploading to a server. RDLC stands for "Client Report Definition Language". Essentially, it is almost the same format but with some differences and even improvements, which, in turn, make it invalid for uploading to SQL Server as it is (not important for BC). However, RDLC can be converted to RDL and vice versa. RDLC/RDL can be worked with in Visual Studio RDLC, but as far as I remember, Microsoft Report Builder cannot be used for RDLC, same for Power BI Report Builder.
Speaking of Business Central, you can use both RDL and RDLC, as both formats are supported. Hereinafter I will say RDLC meaning RDL as well.
When we talk about Word and RDL reports, there are often many manipulative arguments without specifics. My goal is to try to clarify and materialize the main differences between Word and RDL layouts. However, I can't resist also discussing the thoughts that often come up in this debate and responding to them. After that, we will move on to the specifics.
Important: This entire article reflects my personal opinion as a developer who has created around 1,000 RDL/RDLC reports and several dozen Word reports.
Microsoft Word was originally created not for reporting, but for entirely different tasks. This already imposes many problems and difficulties when we try to use Word as a system for report layouts. It’s a massive program with a completely different primary purpose and numerous features that have nothing to do with reporting. I think it goes without saying why this is a disadvantage in the context of a system designed for reporting.
I also heard a rather strange argument: "RDLC hasn't been updated since 2016, so it's outdated and should be replaced". This sounds quite amusing, considering that the Word layout was just recently updated in 2024 by adding conditional visibility... Yes, in 2024, they added conditional visibility! Is this really good argue?
With this logic, we should all urgently abandon JSON, which was last updated in 2017!
If Word layouts are developed directly in Word, RDL reports can be developed in Microsoft Report Builder or in Visual Studio using the Microsoft RDLC Report Designer extension. The difference between Report Builder and Visual Studio is minimal, although, as far as I remember, Visual Studio is even more convenient but that’s beside the point. The key point is that both Report Builder and RDLC Report Designer are specialized tools for creating reports and are essentially more suitable for this purpose than Word.
Microsoft Report Builder
Even Microsoft acknowledges that Word layouts are quite limited compared to RDL. Developers are encouraged to "change your mindset" and use more AL. However, I've heard the argument that Word layouts are simpler and can even be created by non-developers. That doesn’t really align with the idea of needing to use more AL, does it?
This means that Word reports are more difficult to create since we are tied to AL, so the main argument of simplicity boils down to the fact that Word reports are easier to modify. But someone still has to create them, right?
Despite this, Microsoft recommends using Word layouts for documents because RDL can be slow. This is true, of course if a report is poorly designed, for example, by passing a BLOB image in the DataSet in the wrong place, performance issues can arise. This is related to poor report development skills. However, I've never seen a well-made report in both Word and RDLC that had any noticeable difference in performance. Have you noticed anything like that? But most likely because of the sandbox in which RDLC is rendered it is quite possible, just want some real examples.
So, why do many developers prefer creating RDLC layouts over Word layouts? The answer is very simple RDLC is more convenient for development and has much more functionality. But this claim needs to be backed up with facts, and I will try to do that.
Let's start with convenience, which in my opinion is the main issue with Word and one that is probably impossible to fully solve. Yes, new functionality can be added, but changing all of Word to make report creation more convenient is impossible. Some problems are inherently tied to the layout itself. Think about it have you ever formatted documents in Word? Maybe you wrote your thesis there, or you had to prepare documentation. Was it convenient? Have you ever encountered issues where the whole layout breaks for no apparent reason? If you say it was convenient and everything worked perfectly, then congratulations! You’re basically ready for Word layouts, and you just need to wait for all the necessary features to be added to the Business Central Word Add-In. Maybe in 1..5 years, all the required features will be there.
But I find using Word inconvenient in general, especially when precise control is needed to create a specific layout design. Controlling design in Word is indeed challenging because there are many non-obvious elements that affect the result, such as customizable line spacing or dynamic spacing between paragraphs, and so on.
When it comes specifically to report development, at first glance, the Word interface looks quite similar to Visual Studio RDLC/Report SQL Builder, but of course, it’s not the same at all. As an example, let's take a look at the Word and RDLC layouts of the standard report 1306 Sales Invoice.
Word vs. Visual Studio RDLC
The first thing that stands out is that the Word layout already looks almost the same as it will appear when printed, whereas the RDLC layout is more schematic. This is undoubtedly one of the advantages of Word reports over RDLC. However, there is a catch: this visual representation doesn’t tell us anything about where the data comes from, how it is grouped, or what the conditions for displaying the data are. Therefore, for a fair comparison of the interfaces, a more detailed examination is necessary.
For example, working with Word layouts often requires enabling Design mode, which significantly changes the appearance of the report during editing. However, this is, of course, a toggle that can be turned on and off as needed. Anyway, if we want to find out how the data is grouped in a report, Word offers us such a 'convenient' view compared to Visual Studio. It's simply inconvenient.
How data is grouped?
It might also seem that at least Word immediately displays the DataItem to which a control belongs, unlike RDLC, and that’s a plus. But unfortunately, this is actually a big problem it only indicates that no customizable data grouping exists in Word layouts. How the DataSet is formed is the fundamental factor for data grouping. This is why you can simply specify the XML Path to the DataItem, as this information is fundamental. In RDLC, this is not so necessary due to dynamic grouping and more advanced DataSet management. I think this cannot be changed by any BC Report Word Add-In, but maybe I’m wrong?
Why do you think no one creates checks in Business Central using Word? I have an opinion on this that it's all about precision. Creating an RDLC report with accurate placement of blocks and fields is quite challenging, but doing this in Word is almost impossible. Yes, there is a built-in ruler in both Word and Visual Studio, but believe me, when you need extreme precision, it won't help. The only working solution is the use of exact coordinates, which are absolutely disaster in Word.
Is a ruler enough?
I can't believe that Word could ever become a truly convenient tool for report creation. It may become more convenient than it is now, but Word itself will never come close to the usability of RDLC.
Now let’s talk about the functionality that is missing in Word layouts. Some of these shortcomings can be compensated for through manipulations with the DataSet or AL. However, this still means that this functionality is absent in Word layouts.
However, Microsoft is actively working on improving and adding basic features to Word layouts. For example, quite recently in 2024, features like Insert Layout Comment, Hide Table/Row/Column if empty, and Hide field if zero were added. On one hand, it’s great that progress is being made, on the other hand, it’s surprising that such basic features were only introduced now.
To use the new functionality in Word layouts, you need to install the Business Central Word Add-In as shown in the screenshot below.
Business Central Word Add-In
I strongly recommend installing this Add-In if you work with Word layouts, as it will likely have much more functionality in the future.
Business Central Word Add-In
So, we have Word layouts and the Business Central Word Add-In, but what functionality is still missing from Word layouts?
Data grouping from the DataSet. Yes, indeed, Word does not support data grouping. This is one of the most basic features that must be present in any good report creation tool. You can read more about what data grouping is in one of my previous articles. So, if you want to group data for a report, it's better to use RDLC. Otherwise, you’ll have to struggle with temporary buffer tables and AL
In Visual Studio RDLC, it’s quite simple to do, data can be grouped by any fields, and both row and column data grouping are supported.
RDLC Data Grouping
Conditional control/row/column/group/table visibility. You simply cannot dynamically control visibility in Word layouts. I hope I don’t need to explain how necessary this is. In Visual Studio RDLC, dynamic visibility is supported, including conditions of any complexity using the VBA IIf function.
RDLC Conditional visibility examples
Conditional value for controls. This is simply absent in Word layouts. In RDLC, the same IIf() function can help us.
RDLC Conditional value
Conditional formatting, font, background color, text alignment, etc. The list could go on and on these features are all missing in Word layouts but are available in RDLC.
RDLC Conditional font/color/text alignment/etc.
RDLC Conditional font/color/text alignment/etc.
Advanced formatting for numbers, date, time. Word does have formatting only for date or time, but it is quite limited. In RDLC, you can format numbers and much more.
RDLC Advanced formatting
Table and group filters. The ability to filter data in a table or even in a group is present in RDLC but not in Word.
RDLC Table/Group filters
Group page breaks. What if we want to print certain groups on a new page? Of course, we can't do this in Word, but we can in RDLC even conditionally!
RDLC Page breaks
Advanced value calculations. We can calculate anything directly in the RDLC layout, but not in Word.
RDLC Page breaks
Render HTML in control. What if we want to render HTML content in a report? Well, in that case, Word can’t do it, while RDLC can partially, as some HTML tags are simply ignored. By the way, in 2021, I wrote an article about how to render HTML content in Word, where I also covered many interesting aspects of the .DOCX format structure. I recommend reading it.
RDLC Render HTML
A huge number of built-in functions. Many of the built-in functions available in RDLC are simply absent in Word layouts.
RDLC Built-in functions
And much, much more! This already shows how much is simply unavailable in Word layouts.
Is it really that bad? Why do we even need Word layouts then? In fact, there are a few reasons why Word layouts might not be so bad after all.
Word layouts visually look better than RDLC! You might think, what difference does it make? But the reality is that it’s much easier to make Word layouts visually appealing compared to RDLC, as Word is, after all, a great program for laying out a beautiful static document.
Word layouts are too simple to be slow. Yes, on one hand, there are functional limitations, but despite the inconvenient UI, I believe that from a performance perspective, it's harder to mess up a Word layout compared to RDLC. Additionally, as I’ve already noted, Microsoft themselves claim that native Word rendering is faster than RDLC rendering in the report sandbox.
Word layouts are easy to edit. This is only true when we’re talking about simple cosmetic changes if we need more significant modifications, Word layouts are no different from RDLC in this regard. However, simple edits are much easier to make in Word, and you don’t need to learn anything new - everyone knows how to use Word.
Therefore, if you don't need data grouping or other advanced functionality and you find it convenient to create reports in Word, then it's your choice. Word will work for simple reports, but not more than that, at least for now.
So, why do we still need RDLC in 2024?
Tools for creating RDLC reports are very convenient and predictable. For me, this is a critically important argument. Creating a report in specialized tools like Microsoft SQL Builder or Visual Studio RDLC is, above all, convenient.
RDLC supports a huge number of features. It's pretty clear here lots of functionality is simply not available in Word. It's not required to change AL each time when we need something special.
RDLC layouts are easy to create. There's no need to write a lot of AL code or use various tricks to achieve the desired result.
RDLC is a widely used report format. The RDL/RDLC formats are not tied to Business Central and are used quite frequently. This means that by learning how to create RDL/RDLC reports, you gain a skill that is valuable not only in Business Central, which is undoubtedly a plus.
So, RDL or RDLC are powerful formats for creating reports in Business Central, and currently, there is simply no alternative to these formats in BC. Therefore, choose RDLC if you need to create either a simple or a complex report.
We have compared the differences between Word and RDL/RDLC reports. This allows us to take a broader view and understand where and which tool should be applied. Personally, as a developer, I find it much more convenient to work with RDL/RDLC, and working with Word reports is always difficult for me, mainly due to the inconvenience of creating Word reports. Moreover, the lack of many features also negatively impacts the experience. However, we can see that Microsoft continues to develop Word reporting, and the situation may change. But for now, RDL/RDLC is my choice.
October 1, 2024