Custom Report Layouts
After adding fields to report datasets with SOD, you need to update the report layout to display them. This page explains how to work with custom report layouts.
Understanding Report Layouts
Business Central supports three standard layout types:
| Type | Editor | Best For |
|---|---|---|
| Word | Microsoft Word | Simple reports, mail merge style |
| RDLC | Report Builder/Visual Studio | Complex reports, pixel-perfect |
| Excel | Microsoft Excel | Data analysis, pivot tables |
In addition, Simple Object Designer includes its own Report Layout Designer — a visual, AI-assisted editor that produces PDF layouts entirely inside Business Central, without Word, RDLC, or any external tools. If you are building a new document layout, consider starting there instead: see Report Layout Designer Overview. This page covers the traditional Word and RDLC approach.
Accessing Report Layouts
In Business Central:
- Search for "Report Layouts"
- Or navigate via: Report > Report Layouts
The Report Layouts page shows all custom layouts.
Word Layouts
Exporting a Word Layout
- Go to Report Layouts
- Find your report
- Select the Word layout (or create new)
- Click Export Layout
- Save the .docx file
Adding Fields to Word Layouts
- Open the exported .docx in Microsoft Word
- Enable the Developer tab (if not visible)
- Insert fields using mail merge field syntax
Field Syntax
Word layouts use XML-based field references:
<<[FieldName]>>
Where FieldName matches the dataset column name.
Finding Field Names
After publishing your SOD extension:
- Export the layout
- In Word, view the field names
- Your custom fields appear with their assigned names
- SOD fields include your prefix and suffix
Formatting in Word
Standard Word formatting applies:
- Font styles
- Tables
- Headers and footers
- Images
Importing the Updated Layout
- Go to Report Layouts
- Select the layout
- Click Import Layout
- Select your modified .docx file
- Test the report
RDLC Layouts
Exporting an RDLC Layout
- Go to Report Layouts
- Find your report
- Select the RDLC layout
- Click Export Layout
- Save the .rdlc file
Editing RDLC Layouts
Use one of these tools:
- Microsoft Report Builder (free)
- Visual Studio with RDLC extension
- SQL Server Data Tools
Opening in Report Builder
- Open Report Builder
- File > Open
- Select the .rdlc file
- The report design opens
Adding Fields to RDLC
- In Report Builder, view the Report Data pane
- Your custom fields appear in the dataset
- Drag fields onto the report design surface
- Or insert into existing tables/text boxes
RDLC Expressions
RDLC supports expressions:
=Fields!FieldName.Value
For SOD fields:
=Fields!YourPrefix_FieldName_Hgd.Value
Formatting in RDLC
RDLC provides extensive formatting:
- Precise positioning
- Conditional formatting
- Groups and totals
- Charts and images
- Multiple report sections
Importing RDLC Layout
- Save changes in Report Builder
- Go to Report Layouts in BC
- Import the updated .rdlc file
- Test the report
Excel Layouts
When to Use Excel
Excel layouts are best for:
- Data exports
- Pivot table analysis
- User-customizable output
- Financial analysis
Working with Excel Layouts
- Export the Excel layout
- Modify in Excel
- Reference fields by their dataset names
- Import the updated layout
Creating New Layouts
From Existing Layout
- Go to Report Layouts
- Select an existing layout
- Click Copy
- Modify the copy
From Scratch (Word)
- Create a new Word document
- Add the required field references
- Import as a new layout
Assigning Default Layout
- Go to Report Layout Selection
- Find your report
- Select your custom layout as default
Dataset Refresh
When SOD adds new fields, the dataset changes:
For Word Layouts
Word layouts see new fields in the dataset — provided the layout was exported after the field was published.
If a custom field does not appear in Word's XML mapping pane, it is because the field is not yet in the dataset, or the layout was exported before the field was added and published.
The correct sequence is:
- Add the field to the dataset using the Place on reports column
- Publish
- Then export the Word layout
Only then is the field present in the exported layout's dataset and available for mapping.
For RDLC Layouts
RDLC may need a dataset refresh:
- Open the layout in Report Builder
- Refresh the dataset
- New fields appear in Report Data pane
If refresh doesn't work:
- Export the report definition from BC
- Update the layout to match new dataset
- Re-import
Troubleshooting Layouts
Field Not Appearing in Layout
Check:
- Is the field in the SOD dataset (marked as Placed)?
- Is the extension published?
- Was the layout exported after the field was published? If not, re-export it.
- Is the layout using the correct field name?
A Date Renders as Date/Time (0:00:00)
Known behaviour: a Date field — a transferred Posting Date on Sales Shipment Header, for example — placed in a Word layout can render as a Date/Time value showing a 0:00:00 time stamp. This is a Word layout quirk.
Workaround: create a Text-type Report Calculated Field that formats the date:
FORMAT(Header.Posting_Date)
Add a format number for a specific style:
FORMAT(Header.Posting_Date,0,4)
which renders as 5. April 2021.
The data item element may not literally be named "Header" — adjust the expression to the actual report. Microsoft's standard date formats are documented under the FORMAT property in the Business Central developer documentation. See Report Calculated Fields.
Duplicate Layouts Blocking a Publish
Symptom: publishing keeps failing on a report that has a custom layout.
Cause: the report can end up with the same layout present twice — the one you developed in SOD and the one that was published. The duplication blocks the publish.
Diagnosis: open the Report Layout screen and use the Page Inspection Tool on the layout records. Compare the Application ID field: a published layout has it filled in, while a development layout has an all-zeros (null) Application ID. (In the observed case both showed null, so treat the presence of a leftover duplicate as the trigger rather than relying solely on that field.)
Resolution: the layout with the null Application ID is your development report layout. Keep it — but do not set it as the default layout. Set the default to the published layout instead. Removing the leftover old layout from the report in SOD and republishing resolved the failure while the report continued to render correctly.
Test this in a sandbox first.
Development report layouts are not orphaned garbage. They are retained deliberately; only their use as the default layout should be avoided.
A Corrupt RDLC Blocking a Publish
A corrupt RDLC — typically containing a null byte — can also block publishing on a report that has SOD fields added.
Repair route: export the RDLC (also called RDL — the same thing) from the standard Report Layouts page in Business Central for the affected report, then import that RDLC onto the report in SOD.
Alternatively, exporting the SOD JSON fresh from a known-good environment, importing it into the affected environment, updating symbols and republishing can clear the null-byte problem.
Do not "fix" this by deleting the SOD report customization — that removes every field you added. Repair the layout instead.
Layout Shows Field Name Instead of Value
Cause: Field reference syntax is incorrect.
Solution: Verify the field reference format matches the layout type (Word or RDLC syntax).
Report Errors After Layout Update
Causes:
- Field removed from dataset but still in layout
- Syntax error in field reference
- Incompatible layout version
Solutions:
- Remove references to missing fields
- Verify field reference syntax
- Re-export and start from fresh layout
Layout Not Updating
Cause: Browser caching or BC caching.
Solutions:
- Clear browser cache
- Re-import the layout
- Restart the BC client
Best Practices
Keep Layout Backups
Before modifying:
- Export the original layout
- Save with version numbers
- Document changes
Test Incrementally
- Add one field at a time
- Test the report
- Add the next field
Use Consistent Naming
Name custom layouts clearly:
- "Sales Invoice - Custom Fields"
- "Customer Statement - Extended"
Consider Multi-Layout Scenarios
Some reports support multiple layouts:
- Keep standard layout unchanged
- Create custom layout for extended data
- Let users choose at runtime
Document Layout Changes
Record:
- Which fields were added
- Position in layout
- Formatting applied
- Date of changes