Jump to content
We've recently updated our Privacy Statement, available here ×

Compute two different fields with a Parameter


jhustinel
Go to solution Solved by rajesh.sirsikar,

Recommended Posts

I am now working with a fund system that requires report. I want to know how to compute for the Parameter as CurrentBalance, 1st field as Debit and 2nd field as Credit.

CurrentBalance - Parameter from other program

1st Field - to be add with the current balance

2nd Field - to be subtract with the current balance. 

 

Example           1st Field              2nd Field                         BALANCE

 Current balance                                                                    100,000.00

                            10,000.00          0.00                                  110,000.00

                             0.00                   5,000.00                          105,000.00

                             2,000.00           0.00                                   107,000.00

 Total                   12,000.00        5,000.00                             107,000.00

 

I want to make an expression  for what i've illustrated above as example. I already have the fields and the data i want. I just want to know how to do the ladderized effect for the balance ( In the right corner of ex).  

I already have an expression but it only add / subract with the balance. 

"new Double ($P{param1}.doubleValue() + $F{debit}.doubleValue() - $F{credit}.doubleValue())"

Thanks.

Link to comment
Share on other sites

  • Replies 2
  • Created
  • Last Reply

Top Posters In This Topic

Popular Days

Top Posters In This Topic

Wonderful answer Mr. Sirsikar but i do have some follow-up question. I have a "Parameter" Current Balance here. How can I apply my current balance as the start of the running balance/total here in your report? By the way, your report is great and it work perfectly. Thanks in advance.

 

EDITED: So i get it now. The inputted number 43 in your expression is where my current balance should be set. :D Thanks. I do now get it.

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

×
×
  • Create New...