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

0

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

Yann22300's picture
Joined: Apr 29 2015 - 1:10am
Last seen: 1 week 1 day ago

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.

Yann22300 - 4 weeks 20 hours ago

0 Answers:

No answers yet
Feedback
randomness