Jump to content
Changes to the Jaspersoft community edition download ×

Hide a parameter if a condition is met JasperServer 8.0.0


erikmarbad

Recommended Posts

I have a sql query that returns a list of data:

SELECT pa.attrvalue, pa.attrnameFROM jiprofileattribute paWHERE pa.principalobjectclass = 'com.jaspersoft.jasperserver.api.metadata.user.domain.impl.hibernate.RepoUser'ORDER BY pa.attrname

And I have the following code in jasperstudio to get a default value from the query

<parameter name="LoggedInUserAttributeValues" class="java.util.Collection" isForPrompting="false"/><parameter name="AMB" class="java.lang.String">    <defaultValueExpression><![CDATA[$P{LoggedInUserAttributeValues}]]></defaultValueExpression></parameter>

What I am looking for is that, for example, if the amount of data received by the parameter is only 1, then it should be hidden from me, otherwise, it should be shown and the user can select the option they want, the problem is that there is no I get the way to achieve that, looking for a person said that I achieve it with an if else, but he did not share the code :D, any help about it?

Link to comment
Share on other sites

  • Replies 0
  • Created
  • Last Reply

Top Posters In This Topic

Popular Days

Top Posters In This Topic

Popular Days

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