Skip to main content

Getting Started with RDLC Report Development.

Hi everyone, 

I hope you're all doing well! Today, I’m excited to introduce a new blog series focused on RDLC Report Development in Microsoft Dynamics. Throughout this series, I'll share insights, best practices, and step-by-step guides on how to develop reports in Dynamics NAV. As a developer, I’ll be covering everything I know, so if this interests you, make sure to stay tuned!

In this first post, we’ll go over the basics: what a report is, its components, and how RDLC reports function in the developer environment. For the demonstration, I’ll be using Microsoft Dynamics NAV 2016, but most of the concepts discussed will apply to NAV 2013 R2, NAV 2015, and even newer versions with only minor changes.

Understanding Reports in Dynamics NAV

A report in Dynamics NAV is used to present data in a structured format. Reports serve different purposes, such as generating summaries, printing documents like invoices, and even automating background processing tasks.

Prerequisites for Report Development

Before you start developing reports, ensure that you have:

  • Microsoft Dynamics NAV 2013 or later installed

  • A valid license with report development permissions

  • Visual Studio (for NAV 2013) or Report Builder (introduced in NAV 2013 R2 and later)

Personally, I prefer using Report Builder, as it eliminates the need for maintaining multiple versions of Visual Studio when working across different versions of NAV.

Why Do We Need Reports?

Reports play a crucial role in summarizing data for better decision-making. With so much data spread across various tables in the NAV database, users need consolidated and well-organized information. Reports also allow for:

  • Data visualization: Making raw data understandable through structured tables and layouts.

  • Calculations and expressions: Combining fields, applying formulas, and displaying computed results.

  • Document printing: Generating invoices, shipments, and other business documents.

Types of Reports in NAV

Reports in NAV fall into two categories:

  1. Printable Reports – These generate a visual output (like invoices, sales orders, and purchase orders) that users can print or export.

  2. Non-Printable Reports (Processing-Only Reports) – These perform background processing, such as adjusting item costs or updating records, without producing visible output.

Anatomy of a Report

A report consists of two main parts:

  • Logical Part: Defines the data structure, specifying which tables and fields to use.

  • Visual Part: Determines how the data is presented using Report Builder or Visual Studio.

Report Components

  1. Report Properties – Define general settings for the report.

  2. Data Items – Represent tables used in the report.

  3. Columns – Define which fields from the tables are included.

  4. Labels – Text elements for headers and descriptions.

  5. Request Page – Allows users to filter data before generating the report.

  6. Triggers – Execute logic at different stages of report execution.

Working with Report Triggers

Triggers are essential in report development, as they define when certain actions take place.

Common Report Triggers

  1. OnInitReport – Executes when the report is initialized (before the request page is shown).

  2. OnPreReport – Executes after the user applies filters but before data retrieval.

  3. OnPostReport – Executes after the report has finished running.

  4. OnPreDataItem – Executes before a data item is processed (commonly used for filtering records).

  5. OnAfterGetRecord – Executes once per record fetched from the data item (used for calculations or custom logic).

  6. OnPostDataItem – Executes after all records for a data item have been processed.

To illustrate, let’s create a simple report based on the Salesperson/Purchaser table and observe how these triggers work. 

When the report runs:

  1. OnInitReport executes first (before the request page appears).

  2. OnPreReport executes after filters are applied.

  3. OnPreDataItem runs before fetching records.

  4. OnAfterGetRecord executes once per record retrieved.

  5. OnPostDataItem runs once after all records are processed.

  6. OnPostReport executes at the end.



Conclusion

This post covered the fundamentals of RDLC Report Development in Dynamics NAV, including report types, components, and trigger execution. Understanding these concepts is crucial for building efficient and well-structured reports.

In the next post, we’ll dive deeper into designing report layouts using Report Builder and explore best practices for creating user-friendly reports. Stay tuned!

 Regards,
 Saurav Dhyani

Comments

Popular posts from this blog

RTC Report It is not possible to instantiate the Visual Studio bridge.

Hi all, As a Navision developers I have Multiple Versions of Navision running in single Machine. As discussed Earlier in the post how to run multiple Version of RTC in single machine. So my machine have following details for RTC Versions - NAV 2009 R2    - is installed. NAV 2009 SP1  - is copied at C:\Program Files (x86)\Microsoft Dynamics NAV\60\NAV 6.0 SP1 IN\ NAV 2009         - is copied at C:\Program Files (x86)\Microsoft Dynamics NAV\60\NAV 6.0 IN\ This approach has been working great for execution of Classic and RTC Clients. However, after installing Dynamics NAV 2009 R2, if i tried to view the Layout for an NAV 2009 SP1 Report i was getting the following error: ---------------------------  Microsoft Dynamics NAV Classic  ---------------------------  It is not possible to instantiate  the Visual Studio bridge.  ---------------------------  OK    --------------------------- After searchi...

Dynamics NAV - All that you need to know about MenuSuites.

Hi Readers, This article is based on a request from a blog reader who wanted to understand about MenuSuite in Dynamics NAV. If you have started working with Business central with AL Code then it does not apply to those releases but if you are interested go ahead. Let's start with Future - In Latest and greatest version of product MenuSuite are obsolete and no longer used. So this article applies if you want to learn about C/AL MenuSuite.

Error After Restore SQL Backup of NAV 2013 Database

Hi all, we are facing a conman issue during restoring a SQL Database backup restored for NAV 2013. While Trying to run object from Object Designer we get below listed error (even the service is configured properly) - --------------------------- Microsoft Dynamics NAV Development Environment --------------------------- There are no NAV Server instances available for this database. You must ensure that a NAV Server instance is running and is configured to use the database before you perform this activity. --------------------------- OK    ---------------------------