Jump to content
Changes to the Jaspersoft community edition download ×

kfreisen

Members
  • Posts

    1
  • Joined

  • Last visited

 Content Type 

Profiles

Forum

Events

Featured Visualizations

Knowledge Base

Documentation (PDF Downloads)

Blog

Documentation (Test Area)

Documentation

Dr. Jaspersoft Webinar Series

Downloads

Everything posted by kfreisen

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