Variable wants to add a starting value but Initial Value Expression didn't work

This is my variable setting:

 

Name: test

Value Class Name: java.lang.Integer

Calculation: Sum

Expression:$F{RPTBAMF_NUMBER}

Initial Value Expression:$F{RPTBAMF_INIT}

Increment type:None

Reset type: Report

 

I want to add RPTBAMF_INIT as my starting value, but no matter how you do it, it does not work.

I also tried adding 5 or new Integer(5), The result is still does not work.

 

Any help would be greatly appreciated.

 

skyer20032003's picture
Joined: Jan 13 2022 - 8:22pm
Last seen: 1 week 2 days ago

1 Answer:

Let me confirm your question.

For example, here is the report
Does 'Your test' in the first line mean that '25' is the expected value, not '20'?


If my understanding of the above is correct, then one solution to get '25' is as follows

1. Create a 'test_init_val' in Variable.

2. Write '$V{test_init_val}+$V{test}' in the Text Field expression.

yama818's picture
3679
Joined: Aug 17 2018 - 3:48pm
Last seen: 11 hours 48 min ago
Feedback