web
You’re offline. This is a read only version of the page.
close
Skip to main content

Announcements

No record found.

News and Announcements icon
Community site session details

Community site session details

Session Id :
Small and medium business | Business Central, N...
New Discussion

RDLC Label report printing with Dynamics NAV / Dynamics 365 Business Central: things to know

(1) ShareShare
ReportReport
Posted on by Microsoft Employee

 

Since the advent of RDLC report in October 2018 with NAV 2009 RTM (Build 27808), printing Labels with Report Viewer (RV) component has not been an easy task to accomplish.

SQL Server Reporting Services (SSRS) team, whom historically created RV as an add-on for SQL Server 2000 (yes, exactly, 20 years ago), didn’t had in mind to use reporting services to print e.g. documents nor label.

That is the main reason why you might find some difficulties creating these 2 kinds of report compared to others and, overall, in relation of good old CSIDE Classic Report development.

Considering Label printing this has always been an open wound and a nerve that might be painful to touch.

 

In December 2020 Cumulative Update (CU) for 16.x and 17.x branches (SaaS update included) and in January 2021 for all other supported branches (9.0, 10.0, 11.0, 14.x) there have been enhancement in the way RV component deployed through Dynamics 365 Business Central interacts with Custom Paper Sizes.

Below a short reference to 17.x Knowledge Base (KB) article and relevant entry

Update 17.2 for Microsoft Dynamics 365 Business Central 2020 Release Wave 2 (Application Build 17.2.19367.19735, Platform Build 17.0.19353.19730)

372707

Reports with paper setup that does not match default printer page size can print with incorrect scaling or orientation.

 

Custom Paper Sizes are the bread and butter when designing report for label printing.

The things to know when dealing with RDLC Label report printing, then, are the following:

 

  1. Try avoid using RDLC Report for label printing but interact directly with Label printer driver

Before moving forward with the creation of a RDLC label Report, you have to know that RDLC output within this context will always be an image that will be sent to the label printer. Label printer driver acknowledge that this is an image and, as such, it will take its own time to render the image picture within the label.

 

In other words, labels will never be printed at the same speed as interacting with the printer driver.

Interacting directly with the printer would have the following benefits:

  1. being blazing faster in printing (more productive)
  2. more flexible in configuration
  3. more reliable (independent from RV component printing routine and updates).

 

The drawback is that Interacting with printer driver would require the creation of a custom add-in (.NET or .NET with Azure Functions or JavaScript, etc.) that should be consumed client and/or server side.

Just to give an example, Zebra has a specific language called Zebra Programming Language (ZPL). Creating a TCP client port writer and a stream wrapper it might be possible to send printing commands all the way through the printer. No need to create any kind of RDLC report or smash your head when you have to accommodate for a new field printed in the label or, even worse, when customer decide to change paper label in favour of another format.

 

  1. Be sure that you have the latest specific printer driver targeted for that specific OS.

It happens that one day your customer would call you stating that everything is fine with the ERP except label printing. Everything was moved from an old Windows OS to a shiny brand new WS 2019 and the old label printer did not support the new GDI.

Be sure that you have the appropriate label printer driver in place that is targeted for that specific OS. Moreover, be sure to update the printer driver when needed.

 

  1. MILESTONE RULE. Custom Paper Size must match exactly the paper size created through Printer Driver settings.

If you decide to skip point 1. and go for label printing through RDLC Report, this is the milestone rule to follow.

One simple example. Let’s say that you are in need to print the following labels: 7.62 cm. x 5.08 cm. RDLC report must have the exact size and, obviously, also the report body must not exceed these dimensions. Below a simple example how this should be setup

 pastedimage1608201269031v1.png

And the equivalent settings in the Printer Driver must match and maintain the same paper size parameters.

 pastedimage1608201291613v2.png

 

  1. If you are printing with customer paper sizes (typically with Label Printers) validate that these are printing correctly after deploying a CU or upgrades.

Everything is working fine? Ok. Hold on, I have to deploy the latest CU.

Custom paper size calculation might rarely introduce breaking changes to your existing label report printings, overall considering the orientation (portrait or landscape).

Always test, test and test once again.

 

  1. ROTATION and specific paper format property settings has never been considered.

With a super vast plethora of different label printer and the equivalent wide ocean of exotic printer drivers, some paper format properties such as e.g. rotation (rotate 90, rotate 180, rotate X, etc.) has never been implemented within the printing algorithm hence if these are set in the printer driver they might lead to unpredictable printing results.

Always test, test and test once again.

  1. Try out all different printing experience needed by your users: these might be different.

Printing could be achieved in several different ways within Dynamics NAV / Dynamics 365 Business Central. Below I am just trying to summarize some of them:

Windows Client

  • Print through the Request Page
  • In the request Page click Preview and then Print (this is different than printing directly)
  • Fill Printer Selection page (e.g. report ID and Printer Name) and Print
  • Fill Printer Selection page and click Preview and then click Print

Web Client

  • Enable direct printing through Cloud Printers.
  • Print through Request Page. Within Dynamics 365 Business Central browser client, this will go through a PDF file printer driver first hence it might lead to an unpredictable result client side. Always test the output.

Background session

  • Use Web Services to call Report.PRINT method
  • Server Side printing through Schedule A Report feature (On-Premises only).

 

Once you have tested all the combination that suits you best (the ones used by your customer), you might then decide to create one or more ad hoc report used within each different action (if the experience is different, of course).  Use OnAfterSubstituteReport event to check the CURRENTCLIENTTYPE and decide which report you are in need to run to guarantee the same experience as much as you could.

 

  1. Server side printing checklist.

When enabling server side printing from the request page (click on Schedule option in the request page) or via task scheduler / web services then you better add these bullet points to your check list:

  1. Be sure that label printer driver is added to the NST service login profile in the middle tier machine(s)
  2. Login with NST service login and verify that the custom paper size is correctly set for the label printer under its profile in the middle tier machine(s).

 

 

  1. TOOLING: LINQPad6

If you are exhausted and struggling in find out which are the different paper sizes that printer driver offers, you could download LINQPad6 and inspect printer driver collection.

  1. Download and install LINQPAD6 from Download LINQPad where you have the printer driver installed (client and/or server)
  2. pastedimage1608201436639v3.png
  3. Once installed, it will check and, if not existing already, download .NET core 5.0 when running the LINQPAD6 UI
  4. In the LINQPAD6 UI just type the following.

  pastedimage1608201460567v4.png

string laser = "HP33B624 (HP Tango) (Copy 1)"; 

PrinterSettings printerSettings = new PrinterSettings { PrinterName =  laser};

JsonSerializerOptions jsonOption = new JsonSerializerOptions();

jsonOption.MaxDepth = 128;

jsonOption.ReferenceHandler =   ReferenceHandler.Preserve;

string jsonString = JsonSerializer.Serialize(printerSettings,jsonOption);

Console.Write(jsonString);

 

NOTE: you must change laser definition with the exact name of your printer (you can find it in the printer properties like the one shown below)

 pastedimage1608201480045v5.png

 

  1. Press F4 and add the following dependency references

 

System.Drawing.Printing

System.Text.Json

System.Text.Json.Serialization

                As shown below

 pastedimage1608201491076v6.png

 

  1. Once everything is in place hit the green F5 button. Below there result :

 pastedimage1608201502705v7.png

 

This is the collection of printer settings. These typically includes:

  1. Default page settings
  2. Paper sizes
  3. Paper sources
  4. Printer resolutions

Looking at paper sizes, you might inspect if there are 2 very similar ones (e.g. the same one but it changes the orientation, flipped by rotation) and decide how to proceed further.

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

Introducing the 2026 Season 1 community Super Users

Congratulations to our 2026 Super Stars!

Congratulations to our 2025 Community Spotlights

Thanks to all of our 2025 Community Spotlight stars!

Leaderboard > Small and medium business | Business Central, NAV, RMS

#1
OussamaSabbouh Profile Picture

OussamaSabbouh 1,986 Super User 2026 Season 1

#2
YUN ZHU Profile Picture

YUN ZHU 1,071 Super User 2026 Season 1

#3
Dhiren Nagar Profile Picture

Dhiren Nagar 975 Super User 2026 Season 1

Last 30 days Overall leaderboard

Featured topics

Product updates

Dynamics 365 release plans