Types of Columns in a Report Dataset in Business Central
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
Comments
Post a Comment