Jump to content
Changes to the Jaspersoft community edition download ×

Pass a parameter to a field?


jfb_1973

Recommended Posts

Is there a way to retrieve the value of a property if the property getter requires a parameter?

 

So let's say I have a method getStuff(String foo). Foo is available in my report as a parameter. How would i get the value of getStuff()?

 

It seems like there must be a way to reference the current object returned from the datasource. This would allow you to do more complex things that just retrieve simple bean properties.

 

<variable name="stuff" class="java.util.List">

<variableExpression><![$P{CURRENT_OBJECT}.myStuff($P{foo})]></variableExpression>

</variable>

 

 

Thanks

Link to comment
Share on other sites

  • Replies 1
  • Created
  • Last Reply

Top Posters In This Topic

Top Posters In This Topic

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