Accounting Balance problem

Stimulsoft Reports.WEB discussion
NetitTurkey
Posts: 8
Joined: Thu Feb 06, 2025 10:07 pm

Accounting Balance problem

Post by NetitTurkey »

I have tried many functions and many approaches but I could not get a current account statement Line balance output in ReportsWeb. Am attaching a sample statement image and the MRT that I tried. Can you please help me urgently?
Attachments
Ekstredene (5).mrt
(52.07 KiB) Downloaded 127 times
SampleReportforStimulsoft.jpg
SampleReportforStimulsoft.jpg (173.56 KiB) Viewed 43796 times
Lech Kulikowski
Posts: 7332
Joined: Tue Mar 20, 2018 5:34 am

Re: Accounting Balance problem

Post by Lech Kulikowski »

Hello,

You can use the Footer band with summaries
https://www.stimulsoft.com/en/documenta ... ctions.htm

Thank you.
NetitTurkey
Posts: 8
Joined: Thu Feb 06, 2025 10:07 pm

Re: Accounting Balance problem

Post by NetitTurkey »

Lech Kulikowski wrote: Fri Feb 07, 2025 1:07 pm Hello,

You can use the Footer band with summaries
https://www.stimulsoft.com/en/documenta ... ctions.htm

Thank you.
Hello My primary need is "line (row) balance" But also I need footerband But I thinkthis is not a hard problem.
Lech Kulikowski
Posts: 7332
Joined: Tue Mar 20, 2018 5:34 am

Re: Accounting Balance problem

Post by Lech Kulikowski »

Hello,

Sorry, we did not exactly understand your task. Could you explain your issue in more detail?

Thank you.
NetitTurkey
Posts: 8
Joined: Thu Feb 06, 2025 10:07 pm

Re: Accounting Balance problem

Post by NetitTurkey »

I am trying to calculate a "Balance" for each row in an account statement report. My goal is to ensure that each row calculates the balance by carrying over the previous row’s balance. However, in my current implementation, each row only calculates its own balance and does not include the previous row’s value.

In my dataset, I have a FinansalHareket field structured as follows:

FinansalHareket = 1 → Debit

FinansalHareket = 2 → Credit

Additionally, I have a Tutar field. Using these fields, I am attempting to calculate the Debit, Credit, and Balance columns.

1-) Calculation of Debit and Credit Columns
I created Calculated Columns using the following formulas:
root.FinansalHareket == 1 ? root.Tutar : 0 // Debit Column
root.FinansalHareket == 2 ? root.Tutar : 0 // Credit Column

This step works correctly and assigns the appropriate values to the respective columns.

2-) Attempts at Balance Calculation Initially, I used this formula:

(Previous(root, "Bakiye") == null ? 0 : decimal.Parse(Previous(root, "Bakiye").ToString())) + (root.FinansalHareket == 1 ? root.Tutar : -root.Tutar)

However, this formula resulted in "Only calculating for the current row, without retrieving the previous row’s value."

3-) Alternative Approaches and Errors Encountered

RunningTotal Function:

-I tried {RunningTotal(IIf(root.FinansalHareket == "Debit", root.Tutar, 0)) - RunningTotal(IIf(root.FinansalHareket == "Credit", root.Tutar, 0))}.

-However, I received an error stating "RunningTotal is not recognized in this context."

Using Previous Function with Bakiye Field:

-I attempted Previous(root, "Bakiye").

-However, I encountered an error: "Previous does not have the required parameters."

Manually Assigning Values in TextBox Fields:

-I tried {root.Bakiye} in a field, but it did not carry over values from the previous row.

=== Expected Result===

I expect the balance to be calculated as previous balance + debit - credit for each row. However, at present, each row only calculates its own balance without considering the previous row’s value.

How can I resolve this issue? What is the correct way to implement Previous or RunningTotal in this case?
JohnW
Posts: 113
Joined: Mon Nov 20, 2017 8:29 pm

Re: Accounting Balance problem

Post by JohnW »

You may want to take a look at Running Totals in the documention and see if that gives you what you want.

https://www.stimulsoft.com/en/documenta ... er-manual/
NetitTurkey
Posts: 8
Joined: Thu Feb 06, 2025 10:07 pm

Re: Accounting Balance problem

Post by NetitTurkey »

JohnW wrote: Sat Feb 08, 2025 3:32 pm You may want to take a look at Running Totals in the documention and see if that gives you what you want.

https://www.stimulsoft.com/en/documenta ... er-manual/
Do you think I may not have done enough research?
Could you please be a little more careful in your response?
Lech Kulikowski
Posts: 7332
Joined: Tue Mar 20, 2018 5:34 am

Re: Accounting Balance problem

Post by Lech Kulikowski »

Hello,

Please send test data for your report.

Thank you.
NetitTurkey
Posts: 8
Joined: Thu Feb 06, 2025 10:07 pm

Re: Accounting Balance problem

Post by NetitTurkey »

Lech Kulikowski wrote: Mon Feb 10, 2025 3:51 pm Hello,

Please send test data for your report.

Thank you.
I'm sending HesapHareketler Table as SQL
Attachments
HesapHareketler_202502111525.zip
(4.23 KiB) Downloaded 78 times
Lech Kulikowski
Posts: 7332
Joined: Tue Mar 20, 2018 5:34 am

Re: Accounting Balance problem

Post by Lech Kulikowski »

Hello,

We need some additional time to investigate the issue, we will let you know about the result as soon as possible.

Thank you.
Post Reply