Jump to content

Recommended Posts

Posted

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

  • Replies 2
  • Created
  • Last Reply

Top Posters In This Topic

Top Posters In This Topic

Posted

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.

Posted

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.

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