Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 7992321
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 4, 20262026-06-04T13:31:44+00:00 2026-06-04T13:31:44+00:00

For example I have such strings in ResourceBundle: some.string.1=String 1 some.string.2=String 2 some.string.3=String 3

  • 0

For example I have such strings in ResourceBundle:

some.string.1=String 1
some.string.2=String 2
some.string.3=String 3

In JasperReports I have to print these strings based on some other parameter $P{t}.
I can do it this way – put such expression into field:

($P{t} == 1 ? $R{some.string.1} : ($P{t} == 2 ? $R{some.string.2} : $R{some.string.3}))

Is there any way to implement it that way:

$R{some.string.$P{t}}

?

Thank you

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-04T13:31:46+00:00Added an answer on June 4, 2026 at 1:31 pm

    Use this:

    str("some.string." + $P{t})
    

    I have used similar things… though I don’t remember using exactly this. It ought to work for what you’re describing.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

So I have some openGL code (such code for example) /* FUNCTION: YCamera ::
We have a pair of strings for example such pair Accept-Language : RU ,
I have a column with some string description in it. for example: Bob davids
I have class implementing Comparator<String> which should sort strings in such manner that strings
I have 3 tables in my database, for example with such names: TableA, TableB,
If I for example have <p> some long text </p> on my HTML page,
Here's the problem. I ,for example,have a string 2500.Its converted from byte array into
Example: I have a selector like this, which I give to another method as
Is there a better way to concatenate strings that have 's (such as HTML
I have an Android application and within it some strings which I send through

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.