Want to win a PS4? Go Premium and enter to win our High-Tech Treats giveaway. Enter to Win

x
?
Solved

Prob with parameter in where clause in iReports

Posted on 2009-07-15
1
Medium Priority
?
581 Views
Last Modified: 2012-05-07
In the report query in iReports(3.0.0) this works if I put in a state without quotes in the parameter prompt:

     m.merchant_id  IN($P{RP_COMPANY})  AND                              
     ad.state            IN($P{RP_STATE})         AND ....

if I put in a state with quotes it will not work.  Why?

If I hard code several states, the program works:
    m.merchant_id    IN($P{RP_COMPANY})                 AND                              
    ad.state                IN('PENNSYLVANIA','TEXAS')    AND
but if I put the exact same text in the parameter prompt, it will not run.
I have tried it without quotes also, but still doesn't work
0
Comment
Question by:eejkk
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
1 Comment
 
LVL 27

Accepted Solution

by:
mrcoffee365 earned 750 total points
ID: 24862959
There's no problem with having an "In" clause where there's only one element in the array.

So something else must be going wrong.

If your problem is that the first scrap of code doesn't work, then something is wrong with the string in $P{RP_STATE} .  Maybe the string does not have single quotes around it.  Maybe it's null -- that won't work.  Hard to tell without knowing what $P{RP_STATE} is.
0

Featured Post

Free Tool: Subnet Calculator

The subnet calculator helps you design networks by taking an IP address and network mask and returning information such as network, broadcast address, and host range.

One of a set of tools we're offering as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

An overview of cyber security, cyber crime, and personal protection against hackers. Includes a brief summary of the Equifax breach and why everyone should be aware of it. Other subjects include: how cyber security has failed to advance with technol…
This week I attended a Startup Week Chattanooga talk on Gender Diversity in Technology. Check out what I learned.
In this video, Percona Solution Engineer Dimitri Vanoverbeke discusses why you want to use at least three nodes in a database cluster. To discuss how Percona Consulting can help with your design and architecture needs for your database and infras…
Is your data getting by on basic protection measures? In today’s climate of debilitating malware and ransomware—like WannaCry—that may not be enough. You need to establish more than basics, like a recovery plan that protects both data and endpoints.…
Suggested Courses

618 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question