Skip to main content

Notifications

Announcements

No record found.

Community site session details

Community site session details

Session Id :

Types of Columns in a Report Dataset in Business Central

Khushbu Rajvi. Profile Picture Khushbu Rajvi. 17,504 Super User 2025 Season 1

When defining a dataset for a report in Business Central, you can use the following types of columns:

📄 A field in a table 

Add a field directly from the data item’s table.

dataitem(Customer; Customer)
{
    column(CustomerName; Name) { }
    column(City; City) { }
}
Here, Name and City are fields in the Customer table.

📝 A variable 

Use a variable declared in report.

dataitem(Customer; Customer)
{
    column(Greeting; GreetingText) { }
}
var
    GreetingText: Text[50];

procedure OnPreDataItem()
begin
    GreetingText := 'Hello, Customer!';
end;
Here, GreetingText is a custom variable added as a column.

An expression 

– Use a calculated value or function result.
dataitem(SalesLine; "Sales Line")
{
    column(TotalAmount; "Quantity" * "Unit Price") { }
}
Here, the column calculates Quantity * Unit Price for each sales line.

🏷️ A caption

– Labels or static text not tied to a specific table
dataitem(Customer; Customer)
{
    column(ReportTitle; 'Customer Sales Report') { }
}
Here, ReportTitle is a caption displayed in the dataset.


Thanks For Reading...!!

Regards,
Khushbu Rajvi


This was originally posted here.

Comments

*This post is locked for comments