Jump to content
We've recently updated our Privacy Statement, available here ×

tim.mcgough

Members
  • Posts

    5
  • Joined

  • Last visited

tim.mcgough's Achievements

Newbie

Newbie (1/14)

  • Week One Done
  • One Month Later
  • One Year In
  • First Post Rare
  • Conversation Starter Rare

Recent Badges

0

Reputation

  1. Current link: http://community.jaspersoft.com/jasperreports-server/issues/4346
  2. C-Box, Thank you. I tried working with something like this previously and decided the $X{} syntax just wasn't supported int parameter expressions and moved on. I'll have to read up on $X{} syntax and start fresh next week. I tried a few variations and will get an error where it reads "IN" when compiling. The parameter editor can't parse at the comma. I'm sure it's something simple I'm missing.
  3. I'm able to get that to work for a LIKE clause or $X{IN, student_name, name} for an IN clause. I'd like to have a report where one user can enter a single name (or the start of it) and another user can select a number of names from a list.
  4. I am sure this has been answered before, but can't think of a good search string with the question being on operators. I would like to develop a report in iReports to be published to our Jasper server that gives the end user the option of setting a parameter for IN or LIKE. Most users will want to search on a partial match most of the time, but there are occassions when selecting by multiple repsonses or ensuring an exact match are needed. I have tried several iterations and crawled through the documentation but have had no luck so far. This code doesn't work, but I think it describes what I'm trying to do: and case when $P!{pLOGIN_IN} IS NULL then u.login_name like '$P!{pLOGIN_LIKE}' || '%' else $X{IN, u.login_name, pLOGIN_IN} end [ Edit: Add more detail below] pLOGIN_IN is datatype java.util.List and pLOGIN_LIKE is java.lang.String. The two conditions work independantly. I run into an issue when I try to give the option of using one or the other. I'd like to be able to see if one of the prompts was not set (default value or NULL if no default value is set) and if so use the other. I don't need to put in more error handling (eg, they leave both or neither NULL). As long as it's consistant my users can learn how to use it. I have also tried a couple variations of: $P{pLOGIN_LIKE}.isEmpty() ? "u.login_name like '$P!{pLOGIN_LIKE}' || '%'" : "$X{IN, u.login_name, pLOGIN_IN}" I can get reasonably close (and some users may prefer this) with: AND ( u.login_name like '$P!{pLOGIN_LIKE}' || '%' OR $X{IN, u.login_name, pLOGIN_IN} ) I'm not sure how much a hit my server will be taking if I do that too often and it looks inelegant to me. Any other ideas?
×
×
  • Create New...