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

Announcements

No record found.

News and Announcements icon
Community site session details

Community site session details

Session Id :
Finance | Project Operations, Human Resources, ...
Suggested Answer

Sales Invoice report extension

(0) ShareShare
ReportReport
Posted on by 406

Hello everyone, i want to add some missing fields to the sales invoice report.

In the sales invoice report, we have 3 datasets:SalesInvoiceHeaderFooterTmp, SalesInvoiceLocalizationTmp and SalesInvoiceDS


1.tables that i have added the missing fields: SalesInvoiceHeaderFooterTmp and SalesInvoiceLocalizationTmp (Extension)
2. i added the fields Ex_PreparedBy, Ex_ReceivedBy, Ex_Salesperson, Ex_BankAddress and Ex_Beneficary to the table SalesInvoiceHeaderFooterTmp and the fields        Ex_TaxRate and Ex_VAT to the table SalesInvoiceLocalizationTmp
3. Data type of fields: Ex_TaxRate (String), Ex_VAT(String),Ex_Beneficiary(String),Ex_BankAddress(String),Ex_PreparedBy(String),Ex_ReceivedBy(String),               Ex_SalesPerson(Int64),


Now i need to do extension of the original data provider class which is SalesInvoiceDP (use extension of ) to add these fields.

 but im facing some issue with coding this class. Is there some missing step i forgot to configure?

I have the same question (0)
  • Suggested answer
    GirishS Profile Picture
    27,833 Moderator on at

    Hi Mounir Dev,

    My suggestion will be populating the new field using OnInserting event handler of the report temp table. It will be easier way. instead of extending DP class.

    [DataEventHandler(tableStr(SalesInvoiceHeaderFooterTmp ), DataEventType::Inserting)]
    public static void SalesInvoiceHeaderFooterTmp _onInserting(Common sender, DataEventArgs e)
    {
        //get the current buffer and based on that you can assign new field values.
       SalesInvoiceHeaderFooterTmp  paycheck = sender as SalesInvoiceHeaderFooterTmp;
    }

    Thanks,

    Girish S.

  • D365FO DEV Profile Picture
    406 on at

    Hello girish,

    my problem is that i added the extension of these fields on both temp tables, and since these fields are created by me, they dont have a standard table in order to call them in the loop.

    Im not sure if u got my point, but im facing issues on how to proceed

  • GirishS Profile Picture
    27,833 Moderator on at

    Yes, I understood your issue instead of going for process report extension you can go with table onInserting event handler.

    Refer to the below blog.

    https://nuxulu.com/2019-10-10-extend-the-standard-reports-in-dynamics-365-finance-and-operations/

    Thanks,

    Girish S.

  • D365FO DEV Profile Picture
    406 on at

    Thank you so much, since i provided you with all the fields type and name, is it possible u help me with finalizing my DP class?

  • Mohit Rampal Profile Picture
    12,565 Moderator on at

    Hi, Fields added in the table extension can be accessed like other fields using same table buffer. As Girish mentioned, you need to create pre-insert event handler to map these fields.

  • D365FO DEV Profile Picture
    406 on at

    Girish said to use the OnInserting event handler

  • Mohit Rampal Profile Picture
    12,565 Moderator on at

    Yes, I was referring to OnInserting event. Let us know if any issues during implementation.

  • D365FO DEV Profile Picture
    406 on at

    Actually, i wrote the class but im not sure if its correct,

    pastedimage1682416033364v1.png

    please check it, i will be thankful if u can provide me with the correct class if this one is incorrect.

  • GirishS Profile Picture
    27,833 Moderator on at

    If(headerfooterTemp == null)

    {

    return null;

    }

    Above piece of code is not required. OnInserting is a standard method you will definitely get a buffer for the temp table.

    Rest of all the code seems good.

    Thanks,

    Girish S.

  • Mohit Rampal Profile Picture
    12,565 Moderator on at

    Please delete the code mentioned above, you don't need it.

    Also, after these values in tmp tables, you need to display in report. I hope you know the standard SSRS report cannot be extended, you need to duplicate it and call that report from the controller class.

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

Introducing the 2026 Season 1 community Super Users

Congratulations to our 2026 Super Stars!

Congratulations to our 2025 Community Spotlights

Thanks to all of our 2025 Community Spotlight stars!

Leaderboard > Finance | Project Operations, Human Resources, AX, GP, SL

#1
André Arnaud de Calavon Profile Picture

André Arnaud de Cal... 517 Super User 2026 Season 1

#2
Giorgio Bonacorsi Profile Picture

Giorgio Bonacorsi 440

#3
Adis Profile Picture

Adis 266 Super User 2026 Season 1

Last 30 days Overall leaderboard

Product updates

Dynamics 365 release plans