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

Community site session details

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

Reports: Get field value from previous row and add it to current row

(0) ShareShare
ReportReport
Posted on by 60

Hello,
I am generating a report in business central using the vendor general ledger entry table.

I am trying to sum the  balance on each line based on the amount of the line plus the line balance previously calculated. I cannot set a previous amount since I have multiple groups with multiple currencies and would like to retrieve the amount of the previous line based on the group.

I have attached an image with the values I am getting without calculations (Black) with the values I would want to its left (red).


Screenshot-2023_2D00_02_2D00_16-095154-edited.jpg

I am still new to business central development.

If i have no way of doing it I think I will have to sort by currency and just do the calculations but i would love to hear your suggestions.

I have the same question (0)
  • Verified answer
    Charbel Hleyhel Profile Picture
    60 on at
    RE: Reports: Get field value from previous row and add it to current row

    I was able to fix it using the runningValue function in report builder with the scope as the group.

  • Verified answer
    Greg Enns Profile Picture
    1,106 on at
    RE: Reports: Get field value from previous row and add it to current row

    Thanks for sharing your answer. As an alternate solution, you should also be able to do this in AL using a variable that you include in the dataset.

    See the NetWeight example here: learn.microsoft.com/.../devenv-report-ext-object

  • Charbel Hleyhel Profile Picture
    60 on at
    RE: Reports: Get field value from previous row and add it to current row

    That is an interesting way of doing it and will test it the next time I would need to implement such feature!

    Thank you!

  • Suggested answer
    Saurav.Dhyani Profile Picture
    14,362 Super User 2025 Season 2 on at
    RE: Reports: Get field value from previous row and add it to current row

    Here is an example how to achieve running totals in a RDLC Report -

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…

Pallavi Phade – Community Spotlight

We are honored to recognize Pallavi Phade as our Community Spotlight honoree for…

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

#1
OussamaSabbouh Profile Picture

OussamaSabbouh 2,214

#2
Sumit Singh Profile Picture

Sumit Singh 2,145

#3
YUN ZHU Profile Picture

YUN ZHU 1,887 Super User 2025 Season 2

Last 30 days Overall leaderboard

Featured topics

Product updates

Dynamics 365 release plans