Add Fields to Reports
Adding fields to reports makes custom data available in report layouts. This page explains how to extend report datasets using Simple Object Designer.
Understanding Report Datasets
Business Central reports have two components:
- Dataset - The data available to the report (tables, fields, calculations)
- Layout - The visual presentation (Word, RDLC, Excel)
SOD adds fields to the dataset. The layout must be modified separately to display those fields.
Accessing Report Field Placement
From Existing Fields Page
- Open Tasks > Add existing fields to pages and reports
- Filter to your table
- Select fields
- Use the Reports placement option
From Report Customization
- Open Inspect > Reports
- Select a report
- Click Customize Report
- Add fields to data items
The Existing Reports List
Browse all reports in the system:
Columns
| Column | Description |
|---|---|
| Report No. | Report object ID |
| Customized | Indicator if report has modifications |
| Name | Report name |
| Processing Only | True if report has no output |
| Usage Category | Report category |
| Default Layout | Word, RDLC, or Excel |
Finding Reports
Use filters to find specific reports:
- Filter by Name to search
- Filter by Customized to see modified reports
- Filter by Usage Category to see report types
Adding Fields to a Report
Step 1: Select the Report
- Open Inspect > Reports
- Find and select the target report
- Click Customize Report
Step 2: Identify the Data Item
Reports have one or more "data items" - the tables that provide data:
- A Sales Invoice report might have:
- Sales Invoice Header (data item)
- Sales Invoice Line (data item)
Your field must be on a table that corresponds to a data item.
Step 3: Add Field to Dataset
- In the Report Placements section
- Click New to add a field
- Select the Data Item (table)
- Select the Field
- Mark it as "Placed"
Step 4: Configure Field Properties
| Property | Description |
|---|---|
| Report No. | Target report |
| Report Name | Report name (display) |
| DataItem | The data item/table |
| Field No. | The field to add |
| Field Name | Field name |
| Placed | Yes to include in dataset |
| Decimal Places | Format for decimal fields |
Report Placements Page
The Report Placements page shows all report field configurations:
Columns
| Column | Description |
|---|---|
| Report No. | Report ID |
| Report Name | Report name |
| DataItem | Source table/data item |
| Field No. | Field ID |
| Field Name | Field name |
| Placed | Whether field is in dataset |
| Decimal Places | Formatting for decimals |
Understanding Data Items
What is a Data Item?
A data item is a table reference in the report. For example, the Sales Invoice report includes:
- Sales Invoice Header - One record per invoice
- Sales Invoice Line - Multiple records per invoice
Matching Fields to Data Items
Your field must exist on the table that corresponds to the data item:
| Your Field Table | Can Add To Reports With Data Item |
|---|---|
| Customer | Reports with Customer data item |
| Sales Header | Reports with Sales Header/Invoice Header data item |
| Sales Line | Reports with Sales Line/Invoice Line data item |
| Item | Reports with Item data item |
This is a hard rule: SOD can only add a field to a report if the field exists on one of the report's own data item tables. Fields from other tables cannot be added directly.
For example, report 208 (Delivery Note / Sales Shipment) runs on Sales Shipment Header (110) and Sales Shipment Line (111). Only fields present on 110 or 111 can be added to it.
Identify the report's table first. Report 722 (Physical Inventory List), for instance, runs on the Item Journal Line table — so the field must be created on that table. Do not try to reach the report's table by chaining Field Transfers through intermediate tables; a value routed Sales Line → Item Journal Line commonly arrives as 0. A FlowField on the report's actual data-item table is the reliable approach.
If the field lives on another table
Create a Lookup FlowField on the report's data item table that pulls the value in. Once that FlowField exists on the data item table, it can be added to the report dataset like any other field.
This is also the answer to the very common "the report shows a code, I want the description" request:
- Tasks > Create new fields, adding a field to the table that holds the code field
- Set Type to FlowField
- In Field Settings, set Calculation Type to Lookup, the Related Table to the underlying table (Inventory Posting Group, table 94, for example), and the Related Field to the value you want (Description)
- Publish
- Add the FlowField to the report dataset and update the layout
The same pattern covers a posting group code → its Description, a payment terms code → Payment Terms Description, a salesperson code → Salesperson Name, a user ID → User Name, or a purchaser code → the purchaser's phone number.
Use a Lookup FlowField rather than a Report Calculated Field whenever the value comes from another table. See FlowFields and Field Settings.
Nested Data Items
Reports often have parent-child relationships:
- Header data item
- Line data item (nested under header)
Your field appears in the scope of its data item.
Data items running on the Integer table
Some reports produce output from a data item that runs on the virtual Integer table rather than a real table. This is common in reports that a partner or consultant has heavily customized — a data item named something like "PageLoop" that emits line fields through an Integer-based loop.
SOD cannot place a field into such a loop. SOD attaches a field to the data item matching the field's real source table, which will sit in a different position in the dataset hierarchy from the Integer-based loop carrying the other line fields.
This scenario cannot be solved with SOD. Adding more fields to the real line table will not merge them into the Integer loop.
The same applies to elements — footers especially — bound to the Integer table: since there is no real backing table, no field can be added there.
Microsoft's 100xx financial document reports
SOD adds fields to reports using ReportExtensions. Microsoft's financial document reports in the 100xx range — report 10074 "Sales - Invoice", for example — are designed such that ReportExtensions do not work for line-level data items. The lines that print are "shadow-copied" from a shadow table, and fields cannot be added to that shadow table.
Attempting it makes the added values appear detached from their parent line rows, generating separate, unassociated data rows when the dataset is viewed or exported.
Recommendation: use the equivalent modern report instead. For sales invoices, use report 1306 rather than 10074 — the modern reports support SOD field additions on line data items. (This limitation concerns line/detail data items; header-level fields were not the subject of this finding.)
Decimal Place Formatting
For decimal fields, you can specify formatting:
Format Syntax
Minimum:Maximum decimal places
Examples
| Format | Result |
|---|---|
| 2:2 | Always show 2 decimal places |
| 0:5 | Show 0 to 5 places as needed |
| 2:5 | Show 2 to 5 places |
Leave blank to use the field's default formatting.
After Adding Fields
Once you've added fields to the dataset:
1. Publish the Extension
The fields must be published to become available.
2. Update the Report Layout
SOD adds fields to the dataset, but you must update the layout. If the report uses a layout built with SOD's Report Layout Designer, re-run Learn Report and place the new field on the canvas. For Word and RDLC layouts:
For Word Layouts
- Go to Report Layouts in Business Central
- Export the Word layout
- Open in Microsoft Word
- Add the new fields using mail merge fields
- Import the updated layout
For RDLC Layouts
- Go to Report Layouts in Business Central
- Export the RDLC layout
- Open in Report Builder or Visual Studio
- Add the new fields from the dataset
- Import the updated layout
3. Test the Report
Run the report to verify:
- No errors occur
- Data appears in expected positions
- Formatting is correct
Common Scenarios
Adding Custom Field to Sales Invoice
Goal: Show a custom customer field on sales invoices.
Steps:
- Create field on Customer table
- Create transfer to Sales Invoice Header
- Add field to Sales Invoice report dataset
- Update the layout to show the field
Adding Item Field to Order Confirmation
Goal: Show custom item information on order confirmations.
Steps:
- Ensure field exists on Item or Sales Line
- Add field to Order Confirmation report dataset
- Update the layout
Adding Calculated Information
Goal: Show computed values on reports.
Steps:
- Create a FlowField or use Report Calculated Fields
- Add to report dataset
- Update the layout
Use a FlowField when the value comes from a related table, and a Report Calculated Field when it is an expression over fields already in the dataset.
"I need a new report"
SOD cannot create new report objects. When you want something like an "Item Information Sheet", the approach is to add the fields you need to an existing report that has a matching data item, then design a custom layout for it — in Word/RDLC or the SOD Report Layout Designer.
Getting fields into a Word layout's XML mapping pane
The ordering here matters and is a frequent source of confusion:
- Add the field to the dataset from Add existing fields to pages and reports or Create new fields on existing tables, using the Place on reports column
- Publish the extension
- Then export the Word layout file
If you export the layout before publishing, the field is not in the exported layout's dataset and will not appear in Word's XML mapping pane. Only after publishing and re-exporting is it available to map.
A walkthrough video is at https://youtu.be/SO7R4GieYXw.
Troubleshooting
Field Not Available in Layout
Causes:
- Extension not published
- Field not marked as Placed
- Layout not refreshed
- The layout was exported before the field was published
Solutions:
- Verify field is placed and published
- Re-export/import the layout after publishing
- Check dataset in layout editor
Field Cannot Be Selected for a Report
Symptom: using "Add existing fields to pages and reports", a specific field cannot be added to a given report, and there is no option to transfer it there.
Cause: the field is not on any table the report uses as a data item.
Solution: confirm which tables the report runs on. Only fields on those tables are eligible. If the field you need is elsewhere, create a Lookup FlowField on the report's data item table to bring the value in, then add that FlowField to the dataset.
Custom Field Appears in a Separate Hierarchy
Symptom: an added line field sits in a different position in the dataset hierarchy from the other line fields, and cannot be placed alongside them in the layout editor.
Cause: the existing line fields are output by a data item running on the Integer table, while SOD attaches your field to the real table-based data item.
This cannot be resolved with SOD. Adding further fields to the real line table will not merge them into the Integer-based loop.
Field Shows Wrong Data
Causes:
- Field on wrong data item
- Field not transferred to report table
- Scope issues in layout
Solutions:
- Verify data item selection
- Check if field transfer is needed
- Review layout field references
Report Errors After Adding Field
Causes:
- Incompatible field type
- Missing data item
- Layout references non-existent field
Solutions:
- Review field type compatibility
- Verify data item exists
- Update layout to match dataset
Publish Fails on a Report That Has SOD Fields
The cause may be the report's layout, not your field additions — a corrupt RDLC (null byte) or a duplicated layout record.
Deleting the SOD report customization makes publishing succeed, but it also removes every field you added, so it is not the fix to reach for. Repair or de-duplicate the layout instead. See Custom Report Layouts and Creating and Managing Layouts.
What Requires a Developer
SOD's report support is field-addition. Anything else needs AL:
- Data from a table that is not a report data item, where no FlowField relationship can bridge it. Serial numbers, for instance, live in Item Tracking Entries, which is not part of reports 1306, 1307, 1308 or 208 — adding them requires a developer.
- Comment lines (Sales Order comments, for example) pulled onto a Word layout — the comment data is in a separate table.
- Custom sorting of a report's data, such as sorting a pick instruction layout A–Z by a BIN location column.
- Footer or static elements bound to the Integer table, including a modifiable footer message on invoices or purchase orders.
- BLOB fields. Their content can be of any type and size, and there is no direct way to place a raw BLOB into a report dataset. A function to extract text from a BLOB through calculated fields is under consideration but does not exist today.
The general rule: if the value is not already reachable in the report's dataset, SOD cannot add it. See Limitations.
Best Practices
Match Data Items Carefully
Ensure your field is on the correct table:
- Header fields → Header data item
- Line fields → Line data item
- Master data → Appropriate data item
Test Incrementally
- Add field to dataset
- Publish
- Test that report runs without errors
- Then update the layout
Consider Reporting Needs
Before adding fields:
- Is the data needed on this report?
- Would a calculated field be better?
- Does the layout support the field type?
Document Layout Changes
Keep records of:
- Which fields were added to which reports
- Layout modifications made
- Version of layouts