Solved

Prob with parameter in where clause in iReports

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

Free Tool: IP Lookup

Get more info about an IP address or domain name, such as organization, abuse contacts and geolocation.

One of a set of tools we are providing to everyone 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

Enabling the Skype for Business Meeting Scheduler in Hybrid OWA
Did you know that more than 4 billion data records have been recorded as lost or stolen since 2013? It was a staggering number brought to our attention during last week’s ManageEngine webinar, where attendees received a comprehensive look at the ma…
Email security requires an ever evolving service that stays up to date with counter-evolving threats. The Email Laundry perform Research and Development to ensure their email security service evolves faster than cyber criminals. We apply our Threat…
With Secure Portal Encryption, the recipient is sent a link to their email address directing them to the email laundry delivery page. From there, the recipient will be required to enter a user name and password to enter the page. Once the recipient …

685 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