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

Logged In User Paramenter


mike.atkinson
Go to solution Solved by danoldenkampgmail.com,

Recommended Posts

Goal: Have dashboards that are specific to Location or User.

We have three retail branches. Each branch has several retail users.

I would like to create various dashboard reports which may show either the Branch data, or the User data, depending upon the report. 

Our Jaspersoft implementation is integrated into another program. From which there are only two User accounts ( 1- jasperadmin and 2 - readOnlyUser).

 

Because of this configuration, I presume, and am seeking confirmation, that I can not get the retail user name to drive the report / chart / dashboard, because all users are seen as 'readOnlyUser'.

Question A - is this a correct presumption? 

 

Question B - Am I thinking correctly with the following: 

If I want to be able to create such reports / charts / dashboards, the first step is to create indiviual accounts using the 'Add User...' 

Then add specific Parameters to the Reports I build.

 

While the User properties in Jasersoft does not seem to provide a 'Branch' field, I think I could accomplish by grouping users in various queries. 

 

Any other suggestions or guideposts? 

 

Thanks in advance.

 

Link to comment
Share on other sites

  • Replies 2
  • Created
  • Last Reply

Top Posters In This Topic

Top Posters In This Topic

  • Solution

Users can have custom attributes such as branch that can be fed into the report.

Your application has user, I wonder if you could feed this as a parameter into the report.

 

In the meantime:

A simple temp solution would be to set a branch parameter that is not visible with a default setting.  Make 3 copies of the report / one for each branch.  

Give each a long uniqe random name so each has its own unique URL you could pass out as seperate dashboards.

 

When you make a change to the report copy it to the other 2 and set the default branch.

(Temp until you figure out how to pass the user or want to setup seperate branch logins)

Link to comment
Share on other sites

  • 9 months later...

For anyone who trips over this old post: 

First, I had to create users in Jaspersoft.  I could not do this with the 'readOnlyUser' (as I expected). With individual users created, I was able to use the reserved word parameter  LoggedInUsername  to populate report data. This required creating the parameter in the report, and the table dataset, and linking them together. Then I can use the parameter in the report query ( $P{LoggedInUsername} ) to retrieve user specific information for the report.

 

I am not working on GROUPing individual user results together.

To accomplish this, I first created a User Attribute for Branch, in which our various Branches will be stored for each user.

It appears there is a reserved word : Attribute_Branch, which I should be able to use in a similar manner to LoggedInUsername. (There is also a LoggedInUsernameAttribute reserved word).

The challenge now is how to read the User Attribute from the Jaspersoft program. I do not have Jasper itself as a Data Source, so I think I'm stuck there, at the moment.

 

 

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