'Get a default value of a single select query parameter Jasperserver
I am trying to select a default value in a Jasperserver 8.0.0 dropdown list, the following code gets the dropdown list, the problem is that it changes the default value but it brings me only that default value and the others disappear
SELECT '', pa.attrname
FROM jiprofileattribute pa
WHERE pa.principalobjectclass = 'com.jaspersoft.jasperserver.api.metadata.user.domain.impl.hibernate.RepoUser'
UNION
SELECT pa.attrvalue, pa.attrname
FROM jiprofileattribute pa
WHERE pa.principalobjectclass = 'com.jaspersoft.jasperserver.api.metadata.user.domain.impl.hibernate.RepoUser'
Solution 1:[1]
the solution was that in Jasperstudio the attributes should be passed as default parameter, that way it is chosen by default.
<parameter name="LoggedInUserAttributeValues" class="java.util.Collection" isForPrompting="false"/>
<parameter name="AMB" class="java.util.Collection">
<defaultValueExpression><![CDATA[$P{LoggedInUserAttributeValues}]]></defaultValueExpression>
</parameter>
Sources
This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.
Source: Stack Overflow
| Solution | Source |
|---|---|
| Solution 1 | Erik Martinez Barraza |
