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

How can I get the LoggedInUsername in recent JRs 7.x releases ?


yann22580

Recommended Posts

Hi,

Easy answer, well I thought.

I'd need to get the LoggedInUsername in my report to dispaly a correct image depending on the user logged in.

Before we could use a $P{LoggedInUserName} parameter but I get only a null value in 7.x release. I tried with "$P{LoggedInUser}.getUsername()" too.

What is the new way to get these values ? Is this link outdated anymore ? https://community.jaspersoft.com/wiki/built-parameters-logged-user

Thanks beforehand,

Yann

Link to comment
Share on other sites

  • Replies 1
  • Created
  • Last Reply

Top Posters In This Topic

Top Posters In This Topic

I precise I read the TIB_js-jrs-ce_7.5_Admin-Guide.pdf, ch 5.5.2 without success : "The LoggedInUser and LoggedInUsername parameters are always available for query input controls; they'realways available to reports, as well, even if an input control isn't defined for them. The standard parameters are
 also provided for reports if they're defined as parameters in the JRXML."

Oh, it works fine in a simple report with the LoggedInUsername parameter ! But I need it to work in a report book.

I gonna try to create the same parameter in the main report and send it to the report where I need it and let you know.

Edit: tested ok, in a report book you need to create the parameter in the main then send it to the others reports.

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