Controlling values of Input Control?

0

Here's what I'm trying to do, please someone let me know if this is possible, and maybe some ideas how or maybe some sample code to help would be great...

I need to be able to show different values in an Input Control based on which User is logged into JasperServer. I was hoping to be able to use the UserName as a filter for the query for the Input Control, but parameters to an Input Control don't seem possible. So I was wondering is this is possible with a Bean Data Source or some other method?

I suppose maybe this Bean or Custom data source would be able to determine the User and then have its own JDBC connection to the database and run SQL and apply the User to the SQL to filter the data.

carminez's picture
Joined: Oct 2 2008 - 12:06pm
Last seen: 6 years 1 month ago

6 Answers:

0

Other folks have asked for this, but we haven't been working on it. The Query data source only works with SQL at the moment.

 

Sherman

Jaspersoft

swood's picture
2064
Joined: Jun 21 2006 - 12:48pm
Last seen: 2 years 1 month ago
0

Any chance of getting this on an enhancement list? Controlling the values of parameters is important to be able to deploy a solution in a multi-tenet environment.

So then there is no other way to pull this off, outside of building my own parameter entry page? Which really probably only works for running reports, not when users are building an ad-hoc from a saved topic.

carminez's picture
Joined: Oct 2 2008 - 12:06pm
Last seen: 6 years 1 month ago
0

carminez Wrote:

Any chance of getting this on an enhancement list? Controlling the values of parameters is important to be able to deploy a solution in a multi-tenet environment.

 

We know about the issue, and it is on our roadmap. Doing a general solution is not straight forward, due to the many different ways people implement this.

  • Userid in a column in a table
  • User roles -> security
  • Custom data sources
  • Database permissions, so that you have to connect to the database as a particular user
So then there is no other way to pull this off, outside of building my own parameter entry page? Which really probably only works for running reports, not when users are building an ad-hoc from a saved topic.

 

 

Have a look at using domains in JasperServer v3 Pro. The permissions on domains can do what you want.

 

Sherman

Jaspersoft

swood's picture
2064
Joined: Jun 21 2006 - 12:48pm
Last seen: 2 years 1 month ago
0
Was it implemented in v3.5 community or professional ?? It\'s a mandatory feture in my opinion.
bussard's picture
14
Joined: Apr 29 2009 - 5:31am
Last seen: 5 years 7 months ago
0
I dont think so, but i saw there was a workaround for this. Basically you need to edit the java code and re-compile it. Please search the forum while i search from my site..
anandharaj's picture
Joined: Oct 18 2006 - 5:02pm
Last seen: 1 year 1 month ago
0

I tried to put $P{LoggedInUsername} in a Query and it works. I'm using v3.5. I wonder if exists a way to filter by the roler.



Post Edited by bussard at 05/21/2009 14:36
bussard's picture
14
Joined: Apr 29 2009 - 5:31am
Last seen: 5 years 7 months ago
Feedback
randomness