Solving Barcode Printing Issues in RDLC Reports – Business Central On-Premise (v25)

When working with barcode printing in RDLC reports on Microsoft Dynamics 365 Business Central On-Premise, I recently ran into an issue that had me stumped for hours — and as it turns out, it all came down to a subtle but critical font installation step.

If you’re using Business Central and your barcodes refuse to show up in your reports (even after installing the right fonts), read on — this might just be your solution.

🚫 The Problem: Barcode Fonts Not Showing in RDLC

Here’s what I tried — the standard advice you’ll find across most forums:

  • ✅ Installed the barcode font (Code 128, Code 39, Free 3 of 9, etc.) on the service tier machine
  • ✅ Installed the same font on the user/client machine
  • ✅ Restarted the Business Central Server/NST
  • ✅ Restarted the entire machine
  • ✅ Checked that RDLC reports were using the correct font name

Still — no barcodes were rendered.

🕵️ The Hidden Detail: “Install for All Users”

After much trial and error, I stumbled across the real fix:

When installing a font on the Business Central service tier (server), you must choose “Install for all users” — not just a regular install.

Here’s why:

  • Business Central’s NST runs under a system account, not your logged-in user.
  • Fonts installed only for the current user aren’t visible to the NST process.
  • Unless the font is registered system-wide, RDLC won’t be able to use it.

Install the Barcode Font on the Server

  • Right-click the font file (e.g., Code128.ttf)
  • Choose ➡️ Install for all users

Install the Font on Client Machine (Optional but recommended)

  • This ensures previews and printed reports render properly when opened locally.

Restart the Server

  • Not just the NST service — a full restart helps Windows fully register system fonts.

It’s always the little things! A simple checkbox — “Install for all users” — was all it took to fix what seemed like a mysterious RDLC issue.

If you’re working with barcode fonts in RDLC reports on Business Central and nothing seems to work, double-check your font installation method — this could save you hours of frustration.

Hope this will help!!!

Boosting Performance in Business Central with SETLOADFIELDS

When building customizations or integrations in Microsoft Dynamics 365 Business Central, performance is often a key concern—especially when working with large datasets. One powerful tool for improving performance is the SETLOADFIELDS method on record variables.

🚀 What is SETLOADFIELDS?

In Business Central, when you retrieve a record (using FIND, GET, NEXT, etc.), all fields of the record are loaded from the database by default. This includes fields you might never use, such as FlowFields (which are calculated on the fly). This can lead to unnecessary memory usage and slower data retrieval.

SETLOADFIELDS tells the system which fields to load, so it skips the rest. This can dramatically improve performance, particularly when:

  • You’re looping through large datasets
  • You’re only using a few fields per record
  • Your table includes FlowFields or BLOBs

📘 Syntax

Rec.SETLOADFIELDS(Field1, Field2, ...);

You place this line before reading the records. This tells the AL runtime engine to load only the specified fields when the records are retrieved.

Let’s say you need to loop through all items and check their No. and Inventory:

Item.SETLOADFIELDS("No.", Inventory);
if Item.FINDFIRST then
  repeat
    if Item.Inventory > 0 then
      // do something
  until Item.NEXT = 0;

  1. Use SETLOADFIELDS only when needed – Overusing it without understanding the data flow may result in missing fields or unexpected behavior.
  2. Calling CALCFIELDS still works – You can still explicitly calculate FlowFields after using SETLOADFIELDS.
  3. Resets on modification – If you call MODIFY, INSERT, or VALIDATE, the load fields context is reset. Use SETLOADFIELDS again if necessary.
  4. BLOB and FlowFields – Avoid loading BLOBs and FlowFields unless absolutely necessary. SETLOADFIELDS helps you skip them efficiently.

👨‍💻 Summary

FeatureWithout SETLOADFIELDSWith SETLOADFIELDS
Data LoadedAll fieldsOnly specified fields
Memory UsageHighLower
SpeedSlowerFaster

By leveraging SETLOADFIELDS, developers can significantly optimize the performance of their AL code in Business Central. It’s a small addition that can make a big difference in speed and scalability.

Avoid it when doing full record operations like MODIFY, unless you’re confident about which fields are required.

Stay Tuned for more…

Boosting Performance in Business Central with SetAutoCalcFields

In today’s fast-paced business environments, performance optimization is not a luxury — it’s a necessity. Whether you’re building custom reports, extending pages, or writing integration APIs in Microsoft Dynamics 365 Business Central, slow operations can frustrate users and strain resources.

One simple but powerful technique to improve performance is using the SetAutoCalcFields method.

Why FlowFields Matter for Performance

In Business Central, FlowFields are virtual fields calculated on the fly, not stored physically in the database. Examples include:

  • Inventory on Item
  • Balance on Customer

When you retrieve a record, FlowFields are not calculated automatically unless you explicitly call CalcFields().

Manually calculating FlowFields for every record during loops, leading to multiple SQL queries — one for each record — causing heavy load and slower performance.

SetAutoCalcFields solves this by batch-calculating FlowFields along with the record fetch.
Instead of running one query per record, it combines the calculation in a single optimized query.

Imagine fetching 1,000 customers and displaying their balances without SetAutoCalcfields:

CustomerRec.FindSet();
repeat
    CustomerRec.CalcFields(CustomerRec.Balance); // Triggers a DB call every time!
    DisplayBalance(CustomerRec."No.", CustomerRec.Balance);
until CustomerRec.Next() = 0;

Result:
  • 1 SQL query to get Customers
  • + 1,000 SQL queries for Balances

With SetAutoCalcFields:

CustomerRec.SetAutoCalcFields(CustomerRec.Balance);
CustomerRec.FindSet();
repeat
    DisplayBalance(CustomerRec."No.", CustomerRec.Balance);
until CustomerRec.Next() = 0;

Result:
  • 1 SQL query to get Customers and Balances together

Benefits of Using SetAutoCalcFields

  • Improved Page Load Times: By deferring calculations, pages with numerous records and calculated fields will load significantly faster.
  • Faster Report Generation: Reports that rely on calculated fields will be generated more quickly as the calculations are performed only when the field’s value is actually needed for display or processing.
  • Reduced Database Load: Fewer automatic calculations translate to fewer database queries, reducing the overall load on your Business Central database.
  • Enhanced User Experience: Snappier performance leads to a more responsive and enjoyable user experience.

Best Practices for Performance Gains

To maximize the benefits of SetAutoCalcFields:

  • Only specify necessary FlowFields:
    Don’t auto-calculate every FlowField — focus on what your process needs.
  • Use it before data retrieval:
    Call SetAutoCalcFields before FindSet(), FindFirst(), or FindLast()
  • Avoid unnecessary recalculations:
    Once FlowFields are set to auto-calculate, do not manually call CalcFields() again for the same fields.
  • Monitor heavy FlowFields:
    Some FlowFields (e.g., Inventory) involve complex sums across tables — only auto-calculate when really needed.
  • Profile your code:
    Use Performance Profiler to measure improvements.

Using SetAutoCalcFields properly can lead to dramatic performance improvements in Business Central.
By reducing SQL traffic, simplifying code, and batch-fetching FlowFields intelligently, you can create faster, cleaner, and more scalable applications.

A small change in your coding habits can create a big impact for your users.

Hope this will help..

File.ViewFromStream in AL: Display Text Directly from Stream

Microsoft Dynamics 365 Business Central 2025 Wave 1 continues to improve its developer experience with handy new features. One of the exciting additions in this release is the File.ViewFromStream method — a simple yet powerful function that enhances how developers interact with files stored in memory.

In the current versions of Business Central, when you need to view an attached document, a report output, or an incoming file, the typical process involves downloading the file first and then opening it with an external application. This can be time-consuming, especially when dealing with multiple files or when you simply need a quick glance at the content. Switching between applications disrupts your workflow and can feel inefficient.

📘 What is File.ViewFromStream?

The new method File.ViewFromStream(Stream: InStream,Text[,Boolean]) enables developers to open or preview a file directly from a stream, without having to save it to a temporary physical file.

This is a major convenience when working with files generated on the fly — such as PDFs, Excel files, or text reports — especially in scenarios where users just need to view or download the file rather than save it on the server.

Syntax

[Ok := ]  File.ViewFromStream(InStream: InStream, FileName: Text [, AllowDownloadAndPrint: Boolean])

🛠 Example:

procedure ShowGeneratedReport()
var
    TempBlob: Codeunit "Temp Blob";
    OutStream: OutStream;
    InStream: InStream;
    ReportContent: Text;
begin
    ReportContent := 'Hello from AL!' + Format(CurrentDateTime) + '\nThis is a preview of your text report.';

    TempBlob.CreateOutStream(OutStream);
    OutStream.WriteText(ReportContent);

    TempBlob.CreateInStream(InStream);
    File.ViewFromStream(InStream, 'ReportPreview.txt', true);
end;

💼 Use Cases

Here are some scenarios where ViewFromStream can be a game-changer:

  • Previewing customer invoices or sales reports generated on-demand.
  • Opening files attached in workflow approvals.
  • On-the-fly document generation in extensions or apps.

The File.ViewFromStream method offers a powerful and user-friendly way to present stream content directly within Dynamics 365 Business Central. The File.ViewFromStream method is a lightweight, client-friendly way to present text content on the fly in Business Central.

Stay tuned for more.

SessionInformation.Callstack() in Business Central

Introduced in Business Central Wave 1 2025 releases, the SessionInformation.Callstack() method is a powerful diagnostic tool that helps developers trace the current call stack within AL code. Whether you’re troubleshooting custom extensions, tracking errors, or building telemetry, this method can become your best friend.

What is the SessionInformation.Callstack() Method?

The SessionInformation.Callstack() method is a built-in function in AL that returns a text string representing the current call stack of the Business Central server session. Think of the call stack as a chronological list of the functions and procedures that have been called to reach the current point in your code.

Each entry in the call stack typically includes:

  • Object Type and Name: The type of object (e.g., Codeunit, Table, Page) and its name.
  • Function/Procedure Name: The specific function or procedure being executed.
  • Line Number: The line number within the function/procedure where the call originated.

📌 Syntax

var
    CallStackText: Text;
begin
    CallStackText := SessionInformation.Callstack();
end;

🧩 Why is the Call Stack Important?

Understanding the call stack is crucial for several reasons:

  • Debugging: When an error occurs, the call stack provides a trace of the execution path leading up to the error. This helps you pinpoint the exact location where the issue originated and understand the sequence of events that triggered it.
  • Error Handling: By capturing and logging the call stack when an error occurs, you can provide more context to administrators or support teams, making it easier to diagnose and resolve issues.
  • Code Understanding: Analyzing the call stack can help you understand the flow of execution in complex codebases, especially when working with unfamiliar code or trying to understand how different modules interact.

You can combine this with

  • ErrorInfo object (for AL error handling)
  • SessionInformation.UserId() or CompanyName() for full diagnostic logs
var
    CallStack: Text;
    ErrorData: ErrorInfo;
begin
    if not TryMyFunction() then begin
        GetLastError(ErrorData);
        LogToTable('Error: %1 - Stack: %2', ErrorData.Message, SessionInformation.Callstack());
    end;

SessionInformation.Callstack() is a small method with big potential. It’s the AL developer’s X-ray — revealing the path of execution in complex customizations or tangled logic.

Use it smartly, especially in:

  • Error handling routines
  • Long-running jobs
  • Telemetry and diagnostics pipelines

Stay Tuned for more updates

Production Order Cancellations: Reversing Consumption in Business Central V26

Production orders are the backbone of manufacturing operations, but sometimes, plans change. Orders need to be cancelled, and when those orders have already consumed materials, things can get tricky. Business Central V26 has stepped in to simplify this process, offering a more streamlined way to reverse consumption and cancel production orders. Let’s explore how this works.

Imagine you’ve started a production order, materials have been consumed, and then, for whatever reason, the order needs to be scrapped. In previous versions of Business Central, simply deleting the order wasn’t an option. The system needed a way to accurately reverse the consumption entries to maintain inventory and financial integrity. This often involved manual adjustments and could be a time-consuming, error-prone process.

Business Central V26: Simplifying the Reversal:

Enter the “Reverse Production Order Transaction” action in Business Central V26. This feature provides a more efficient and accurate way to undo consumption and output transactions, making production order cancellations less of a headache.

How it Works:

  • Reversing Item Ledger Entries:
    • When you use the “Reverse Production Order Transaction” action, Business Central generates reversing item journal lines.
    • These lines effectively negate the original consumption entries, returning the materials to inventory.
  • Handling Output and Capacity:
    • The system also reverses output and capacity entries, including quantities, scrap, setup time, and run time.
    • This ensures that all related ledger entries are accurately adjusted.
  • Accurate Ledger Updates:
    • The system applies these reversals to the original ledger entries, maintaining precise inventory and cost records.

After reversal of production order you can finish production order without output. To achieve this you need to enable the setup on Manufacturing setup

Activate the Finish Order Without Output toggle in the Manufacturing Setup page.

Business Central V26’s enhanced capabilities for reversing production order transactions represent a significant step forward in simplifying production management. By automating the reversal process, manufacturers can save time, reduce errors, and maintain accurate inventory and financial records. This feature is a valuable addition to the Business Central , making production order cancellations less of a burden and more of a seamless operation.

Stay tuned for more updates.

Preview PDFs Directly in Business Central Web Client (v26)

With the release of version 26, a significant productivity boost has arrived: direct PDF attachment previews within the web client. No more downloading, opening external viewers, or switching between applications. This streamlined experience lets you access and review crucial documents instantly, right within your Business Central workflow.

What Does This Mean For You?

Imagine you’re processing a purchase order and need to quickly verify the attached vendor invoice. Previously, you’d have to download the PDF, open it in a separate application, and then return to Business Central. This process was time-consuming and disruptive.

Now, with the new preview functionality, you can:

  • View PDFs directly in the FactBox: When a PDF is attached to a record (like a sales order, purchase invoice, or customer card), you can preview it instantly in the FactBox without leaving the page.
  • Save time and improve efficiency: Eliminate the need for downloads and external viewers, allowing you to focus on your core tasks.
  • Enhance collaboration: Quickly share and review documents with colleagues, streamlining approvals and decision-making.
  • Enjoy a seamless user experience: The integrated preview functionality provides a more intuitive and efficient workflow.

How Does It Work?

The new feature leverages the browser’s built-in PDF rendering capabilities. When you click on a PDF attachment in the FactBox, the document opens directly within the Business Central web client, allowing you to:

  • Scroll through pages.
  • Zoom in and out.
  • Search for specific text.

This feature is enabled by default in Business Central version 26. Simply open a record with a PDF attachment, and you’ll see the preview option in the FactBox.

For Developers:

  • Microsoft has added the following AL methods to enable this functionality.
    • File.ViewFromStream (for Business Central online)
    • File.View (for Business Central on-premises)

Introduction of ‘Continue’ in Business Central v26

The Dynamics 365 Business Central ecosystem is in a state of continuous evolution, with each release bringing enhancements that empower developers and refine business processes. With the advent of version 26 (2025 release wave 1), a particularly noteworthy addition to the AL programming language is the continue statement. While seemingly a minor syntactic change, its implications for code efficiency and clarity are substantial.

A Refined Approach to Loop Control

In the realm of business application development, loops are indispensable. They facilitate iterative data processing, automation of repetitive tasks, and the implementation of complex algorithms. However, traditional loop structures often necessitate convoluted conditional logic to bypass specific iterations, leading to code that is both verbose and difficult to maintain.

The introduction of continue addresses this challenge directly. By providing a concise mechanism to skip the remaining code within a loop’s current iteration and proceed to the next, it promotes a more streamlined and readable coding style.

Benefits for Business Central Developers

  • Enhanced Code Readability: The continue statement reduces the reliance on nested IF statements, resulting in cleaner and more maintainable code. This is particularly crucial in large-scale Business Central implementations where code clarity is paramount.
  • Improved Performance: By bypassing unnecessary code execution, continue contributes to optimized loop performance. This is especially relevant when processing large datasets or executing computationally intensive operations.
  • Modernization of AL: The inclusion of continue aligns AL with contemporary programming paradigms, enhancing its usability for developers accustomed to other languages. It signifies changes to evolving AL into a more robust and versatile development platform.
  • Increased Development Flexibility: The ability to finely control loop execution grants developers increased flexibility when coding. This allows for more complex and efficient algorithms to be developed.

Where Can You Use ‘Continue’?

The continue statement is your ally within various loop structures in AL:

  • for loops: Ideal for iterating a specific number of times.
  • while loops: Perfect for looping until a condition is met.
  • repeat...until loops: Useful for executing a block of code at least once.
  • foreach loops: Designed for iterating through collections.

A Case in Point

Consider a scenario where a developer needs to process a batch of sales orders, excluding those with specific characteristics. Without continue, the code might involve nested IF statements to filter out unwanted orders. However, with continue, the logic becomes significantly more concise:

local procedure ProcessSalesOrders(SalesOrderRecord: Record "Sales Header")
begin
    SalesOrderRecord.Reset();
    SalesOrderRecord.FindSet();

    repeat
        if SalesOrderRecord."Order Type" = SalesOrderRecord."Order Type"::Quote then
            continue; // Skip quotes
        end;

        // Process the remaining sales order logic here
        // ...
    until SalesOrderRecord.Next() = 0;
end;

This example illustrates the power of continue in simplifying loop logic and enhancing code clarity.

Stay tuned for more.

What is planned for Business Central Wave 1 2024 release

As we are gearing up for new release of business central and already the buzz is started for new version. Here listing few upcoming features which I am looking forward in new version.

Copilot and AI innovation

One of the hot topics in market and lot of new features are revolved around this innovation such as

Introduce Power Automate Copilot integration with Business Central

Create sales lines easily with Copilot

Create product information faster with Copilot

Complete bank account reconciliation faster with Copilot

Map e-documents to purchase order lines with Copilot

Learn more about fields with Copilot

Development

This time less features planned for development side but are important

Debug the system application : This will help us to understand the code flow while debugging the application.

Remove friction when working with external app dependencies :- With this feature MS will make it possible to download the symbols from AppSource applications so we no need to depend on publisher of app.

User experiences

Use drag and drop to attach multiple files

Use actions to navigate and highlight or fix platform-generated errors

Share error details to get help from another user

There are more and more rich features planned for this release please keep an eye on

What’s new and planned for Dynamics 365 Business Central

Stay tuned for more….