Jump to content
Changes to the Jaspersoft community edition download ×

How to pass loginname as parameter


murali.aitha

Recommended Posts

Hi,

 

I created jasperreport using ireport with the parameter LoggedInUser,for that i have given datatype as com.jaspersoft.jasperserver.api.metadata.user.domain.User working fine in ireport,but after uploading into jasperserver its getting as this reporting is empty.Its not getting username from jasperserver,If i create input control for that parameter then its working,Please help me.

 

Thanks,

Link to comment
Share on other sites

  • Replies 5
  • Created
  • Last Reply

Top Posters In This Topic

Popular Days

Top Posters In This Topic

Hi,

I created a parameter LoggedInUser in ireport then i have given class type as com.jaspersoft.jasperserver.api.metadata.user.domain.User and then 1 more parameter ct_user class type as java.lang.String for both the params i have given a default value (Object)$P{LoggedInUser}.getUsername().while running the report I have given a value for ct_user param then report comming fine in ireport.I uploaded that same jrxml into jasperserver-1.2.1.I created some users in jasperserver for login,after login into server i clicked the report then the message comming as "the report is empty" if i give input control for parameter ct_user then report getting data,otherewise no[its not getting username as parameter],is this operation is fine or any whereelse we need 2 pass loggedin user param in jasperserver?please give response

 

Thanks,

Murali

Link to comment
Share on other sites

murali.aitha wrote:

Hi,
I created a parameter LoggedInUser in ireport then i have given class type as com.jaspersoft.jasperserver.api.metadata.user.domain.User and then 1 more parameter ct_user class type as java.lang.String for both the params i have given a default value (Object)$P{LoggedInUser}.getUsername().while running the report I have given a value for ct_user param then report comming fine in ireport.I uploaded that same jrxml into jasperserver-1.2.1.I created some users in jasperserver for login,after login into server i clicked the report then the message comming as "the report is empty" if i give input control for parameter ct_user then report getting data,otherewise no[its not getting username as parameter],is this operation is fine or any whereelse we need 2 pass loggedin user param in jasperserver?please give response

Thanks,
Murali

 

To be frank, reading your post was rather painful so I'm not sure I understood much from it.

 

You may try the following: if you want to actually see the value of one or more parameters, set whenNoDataType="AllSectionsNoDetail" and then include in the title band textfields that display the desired parameter values.

 

Do this for your report and post here the parameter values you get. If the values are not as expected, post relevant JRXML fragments (such as the parameter definitions).

 

Regards,

Lucian

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