Jump to content
Changes to the Jaspersoft community edition download ×

kfreisen

Members
  • Posts

    1
  • Joined

  • Last visited

kfreisen's Achievements

Newbie

Newbie (1/14)

  • Week One Done
  • One Month Later
  • One Year In
  • First Post Rare
  • Conversation Starter Rare

Recent Badges

0

Reputation

  1. Hi, So we are trying to set up input controls for our reports that would allow up to get the LoggedInUser's user attributes. To give a little bit of context, we are using external authentication, and the user attributes we are using corrsepond to a collection of ids that we can add to join/where clauses in the input control queries. We also custom utility class that allows us to parse the user attributes and transform them into an sql-safe list (for in statements and whatnot, because the raw attribute value is just a comma seperated string of ids). What I would expect I'd need for this to work is something like this in the jrxml: <parameter name="LoggedInUser" class="com.jaspersoft.jasperserver.api.metadata.user.domain.User" isForPrompting="false"/> <parameter name="userLinkedBriefIds" class="java.lang.String" isForPrompting="false"> <defaultValueExpression><![CDATA[com.jaspersoft.smartbrief.util.UserParamUtil.getAttributeSQLValue($P{LoggedInUser}.getAttributes(), "briefId")]]></defaultValueExpression> </parameter>[/code]Then that I would be able to access that userLinkedBriefIds from the input control query like: select briefid, brief_name from alchemy.dbo.brief bwhere b.activestatus like 'A%'and (b.briefname_alias = '' OR b.briefname_alias is null)and (b.parentid is null)and b.briefid in $P!{userLinkedBriefIds}order by b.brief_name asc[/code]But, the input control doesnt even load in the report and we get an error in the logs with a stacktrace like this (abbreviated since its pretty long) I'm able to get the value of the report parameter from the actual report (by either putting it into a text field or by actually using it in the report query), but from the input control its just not working. Has anyone tried anything similiar and had success?
×
×
  • Create New...