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

Pass local value to global variable


jasper_quest

Recommended Posts

Hello everybody,

I have defined a variable within a dataset of a list. I tried this via "Return Values" with the global variable of the main dataset.
Unfortunately, the inner value from the list variable is not passed to the global variable.
I need the value to tell certain sections by the "print-when-expression" that they should not be printed if the value of the list is 0.
But I always get the value 0 for the global variable.
Can anyone help me please?
Thanks a lot.

Link to comment
Share on other sites

  • Replies 2
  • Created
  • Last Reply

Top Posters In This Topic

Popular Days

Top Posters In This Topic

These are the two variables:

Variable1:

variable name = "content_global"

class = "java.lang.Integer"

calculation = no calculation function

initial value expression = 0

increment type = none

reset type = report

 

Variable2

name = "content"

value class name = java.lang.Integer

calculation = count

expression = $V{content}+1

initial value expression = 0

increment type = none

reset type = report

 

 

I defined at the "return values", that the return value of this dataset run should be overgiven to the content_global.

From Variable: content

To Variable: content_global

calculation Type = no calculation function

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...