web
You’re offline. This is a read only version of the page.
close
Skip to main content

Notifications

Announcements

No record found.

Community site session details

Community site session details

Session Id :
Small and medium business | Business Central, N...
Suggested Answer

Failing to add dataitem to dataset for Transfer Order report

(1) ShareShare
ReportReport
Posted on by 29
Good day,
 
I'm relatively new to BC development. I'm trying to add a custom text field  to the Transfer Order report and reference it in the OnAfterGetRecord trigger.
 
Followed steps on some blogs and managed to add a field to the base table. But now in my reportextension when i attempt to add the dataitem in then dataset it keeps giving me the following error:
 
Please assist me.
 
I'm using: Version: GB Business Central 22.2 (Platform 22.0.57579.0 + Application 22.2.56969.57617)
 
Syntax error, '}' expectedALAL0104
Expected one of the application object keywords (table, tableextension, page, pageextension, pagecustomization, profile, profileextension, codeunit, report, reportextension, xmlport, query, controladdin, dotnet, enum, enumextension, interface, permissionset, permissionsetextension, entitlement)ALAL0198
 
I have the same question (1)
  • Suggested answer
    Yi Yong Profile Picture
    2,559 Super User 2025 Season 2 on at
    Hello,
     
    You are using ReportExtension, you can't add a new dataitem immediately after dataset.
    You can only add new dataitem by referencing to existing dataitem using addafter or addbefore.
     
     
    reportextension 50000 TransferOrder extends "Transfer Order"
    {
        dataset
        {
            addafter(CopyLoop)
            {
                dataitem(NewTransferHeader; "Transfer Header")
                {
                    column(NewField; NewField) { }
                }
            }
        }
    
        var
            NewField: Text;
    }
     
    If you want to add new field into existing dataitem, then you can use Add(DataItem) and insert the new field.
    reportextension 50000 TransferOrder extends "Transfer Order"
    {
        dataset
        {
            add("Transfer Header")
            {
                column(NewField; NewField) { }
            }
        }
    
        var
            NewField: Text;
    }
     
     
  • Suggested answer
    Khushbu Rajvi. Profile Picture
    20,441 Super User 2025 Season 2 on at

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

Responsible AI policies

As AI tools become more common, we’re introducing a Responsible AI Use…

Neeraj Kumar – Community Spotlight

We are honored to recognize Neeraj Kumar as our Community Spotlight honoree for…

Leaderboard > Small and medium business | Business Central, NAV, RMS

#1
OussamaSabbouh Profile Picture

OussamaSabbouh 2,606

#2
YUN ZHU Profile Picture

YUN ZHU 931 Super User 2025 Season 2

#3
Jainam M. Kothari Profile Picture

Jainam M. Kothari 773 Super User 2025 Season 2

Last 30 days Overall leaderboard

Featured topics

Product updates

Dynamics 365 release plans