munga Posted January 16, 2012 Share Posted January 16, 2012 I have a report that is to be used multiple times with a different parameter division_id. So I don't have to recreate the report and all its sub-reports, can I specify a value to be used in the input control without the user having to enter the value?The reason I don't want the user to enter a value is each divisional manager should not be able to see the other divisions reports, and as they should only see one report entering a value in should not be necessary.If this can't be done with an input control can it be done another way?ThanksMungaPost Edited by munga at 01/17/2012 00:26 Link to comment Share on other sites More sharing options...
munga Posted January 17, 2012 Author Share Posted January 17, 2012 I've had partial success, I've found that if you use a single select drop down list and make the input control maditory and read only it stops the user from changing the value but they still have to apply the input controls before the report will run which seems unnessary as it is the only option.Does anyone know how to force to apply with out user input, I thought making the input control invisible would have remove the need for the user to apply the controls but it doesn't.ThanksMunga Link to comment Share on other sites More sharing options...
norcenmarco Posted February 20, 2012 Share Posted February 20, 2012 I didn't understand very well what you mean!I try to guess:Do you have report with ID column and clicking them you want to pass it value to another report to accomplish another task without ask again the user input? Is it right?In that case, right-click on the field you want to pass, go to link and set this two parameter: 1)name = _reportvalue = "report to execute"2)name = "Name of the parameter"value = "Value of the parameter to pass"then when the report is uploaded to jasper select the report modify it and uncheck the checkbox promt as user and there you go! Hope this could help you!Cheers,Marco Link to comment Share on other sites More sharing options...
nikalopolis Posted February 23, 2012 Share Posted February 23, 2012 Munga i am having exactly the same problem.in generic terms, this is what i havein the sql for the report i have "select data from table where pk>=$P{param_pk}i have a parameter definied, param_pki have an input control defined, single select query, mandatory, read-only, this value is pulled from the database pseudo-sql "select value from settings where setting_name='param_pk'this works fine, it displays teh input control, press apply and it works as you would expect now all i want to do is to prevent the user from having to press apply - it is a redundant step as the input control is read-onlyas soon as i make the input control invisible, i get the error "You must apply input values before the report can be displayed." have you found a away around it Link to comment Share on other sites More sharing options...
nikalopolis Posted February 23, 2012 Share Posted February 23, 2012 i have just answered my own question ( i found something whilst looking back through old forum posts)i now have the input control set as mandatory, read-only, visible in ireport, right-click properties of the report3rd tab, other, uncheck "always prompt" hope that helps soembody else Link to comment Share on other sites More sharing options...
munga Posted February 24, 2012 Author Share Posted February 24, 2012 Hi nikalopolis,I've already tried that combination and I was unable to run the report as the only parameter checkbox was un checked and greyed out. When I click the apply button all I got was an error that informed me that I must select a parameter.munga. Link to comment Share on other sites More sharing options...
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now