Jump to content
We've recently updated our Privacy Statement, available here ×

Get LoggedInUserAttributeValues by sql Jasperserver


erikmarbad

Recommended Posts

In the following query I am trying to obtain the value generated by LoggedInUserAttributeValues, however it returns an error, is there any way to pass that attribute through sql?

SELECT DISTINCT "TA_MUS","TA_AMB"FROM "LIBNOMINA"."DET_TABLA"WHERE 'TA_MUS' = '$P{LoggedInUserAttributeValues}'

Link to comment
Share on other sites

  • 2 weeks later...
  • Replies 2
  • Created
  • Last Reply

Top Posters In This Topic

Top Posters In This Topic

that is the wrong syntax for the parameter name. and type  Please look chapter 5.5.2 Built-in Parameters for Query-based Input Controls

here in the documentation for correct syntax and types on these parameter names.   https://docs.tibco.com/pub/js-jrs/7.9.0/doc/pdf/TIB_js-jrs_7.9_Admin-Guide.pdf

The one your are specifying is a collection and meant for use with the $X syntax 

You want LoggedInUserAttribute_::atribute_name:: syntax and a string value if you want to use $P.    Otherwise the string value of a collection may be injected with the [] on it for the collection type.  

Also make sure you are defining a parameter with these names in the report with the correct. matching type.  (Collection, String, etc)

Link to comment
Share on other sites

that is the wrong syntax for the parameter name. and type  Please look chapter 5.5.2 Built-in Parameters for Query-based Input Controls

here in the documentation for correct syntax and types on these parameter names.   https://docs.tibco.com/pub/js-jrs/7.9.0/doc/pdf/TIB_js-jrs_7.9_Admin-Gui...

The one your are specifying is a collection and meant for use with the $X syntax 

You want LoggedInUserAttribute_::atribute_name:: syntax and a string value if you want to use $P.    Otherwise the string value of a collection may be injected with the [] on it for the collection type.  

Also make sure you are defining a parameter with these names in the report with the correct. matching type.  (Collection, String, etc)

Link to comment
Share on other sites

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