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

Adding parameter or reading from HttpSession


jscoobyced

Recommended Posts

Hi,

Here is what I am trying to achieve:

- I have created a custom AuthenticationProcessingFilter that performs the login and adds up some logic to define an external UserId (currently hard-coded but I will have no problem getting it from the DB)
- I want to use this UserId in the report as a $P{UserId} (it has to be a parameter because it's going to be used in the SQL query as well)

I thought that eventually I could push the UserId in the HttpSession and then from iReport I could access the session from a constant parameter (like a HTTP_SESSION parameter). However it doesn't look like I can get this.
Could I 'inject' a new parameter using a scriplet? Where is the scriplet API?

EDIT: it seems that using $P{REPORT_SCRIPLET}.getUserId() I should be able to get what I want. Now I just need to see if I can access the session from the scriplet.

Thanks,
JSC



Post Edited by jscoobyced at 11/04/2010 09:27
Link to comment
Share on other sites

  • Replies 0
  • Created
  • Last Reply

Top Posters In This Topic

Popular Days

Top Posters In This Topic

Popular Days

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