mwarner_2 Posted September 17, 2015 Posted September 17, 2015 Maybe this is real simple, but I don't know how. I want to show in a text field the name of the parameter, not its value. Something like:Selected [parameter name]: [parameter value]example:Selected City: Athens So the text field would be something like "Selected " + $P{City}.name + ": " + $P{City}But I don't know how to do the parameter name part of this.I want to do this so that if I change the Parameter Name, then it is automatically updated in the report (versus if I manually typed the parameter name into the text field).
hozawa Posted September 18, 2015 Posted September 18, 2015 How are you going to distinguish between several parameters? That is, if you have $P{City} and $P{Town}, and you decided to change $P{City} to $P{State}, how do you expect JasperReport to know that you've change ${{City} and not $P{Town} to ${State}?If you just want to display name, you can just create 2 parameters - one for name and one for value.
mwarner_2 Posted September 21, 2015 Author Posted September 21, 2015 I asked if it is currently possible to show/print/display the parameter name, and apparently it is not.There might have been a secret convention like $N{City}, whereby its use would give the name of the parameter and not its value.
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