Solved

Prob with parameter in where clause in iReports

Posted on 2009-07-15
1
579 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 250 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

Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

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

In this post we will be converting StringData saved within a text file into a hash table. This can be further used in a PowerShell script for replacing settings that are dynamic in nature from environment to environment.
There is a lot to be said for protecting yourself and your accounts with 2 factor authentication.  I found to my own chagrin, that there is a big downside as well.
There are cases when e.g. an IT administrator wants to have full access and view into selected mailboxes on Exchange server, directly from his own email account in Outlook or Outlook Web Access. This proves useful when for example administrator want…
In this brief tutorial Pawel from AdRem Software explains how you can quickly find out which services are running on your network, or what are the IP addresses of servers responsible for each service. Software used is freeware NetCrunch Tools (https…

691 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