Jump to content

Sql Query Input query using userid


deepthirohini86

Recommended Posts

Hi,

      I am having a problem that i need extract the parameters values for the logged in user id , and his group id and site id.

So i follow up what Mr.swood had given to achieve this and i write the java code,

by i am having doubts,

Questions:

1) what should be the return type for the function updateQuery.

2) I need to add the parameter for user id, group id, site id.

 

I write the following code.

 

public class querymanip implements com.jaspersoft.jasperserver.api.engine.common.service.IQueryManipulator {
public    updateQuery(String queryString, Map parameters) {
    Authentication auth = SecurityContextHolder.getContext().getAuthentication();
        UserDetails details = auth.getPrincipal();
        String userName = details.getUsername();
    }
}

What should be the return type

questions:

************

1) userName in the code and the parameter what we given in the query should be same or different?

2) Can i store more than one parameter ?

Kindly give me ur suggestion , how to do this.

Regards,

Rohini A.M



 

Link to comment
Share on other sites

  • Replies 0
  • Created
  • Last Reply

Top Posters In This Topic

Popular Days

Top Posters In This Topic

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