Solved

Prob with parameter in where clause in iReports

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

Accepted Solution

by:
mrcoffee365 earned 250 total points
Comment Utility
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

How your wiki can always stay up-to-date

Quip doubles as a “living” wiki and a project management tool that evolves with your organization. As you finish projects in Quip, the work remains, easily accessible to all team members, new and old.
- Increase transparency
- Onboard new hires faster
- Access from mobile/offline

Join & Write a Comment

Suggested Solutions

Learn to move / copy / export exchange contacts to iPhone without using any software. Also see the issues in configuration of exchange with iPhone to migrate contacts.
Veeam Backup & Replication has added a new integration – Veeam Backup for Microsoft Office 365.  In this blog, we will discuss how you can benefit from Office 365 email backup with the Veeam’s new product and try to shed some light on the needs and …
Illustrator's Shape Builder tool will let you combine shapes visually and interactively. This video shows the Mac version, but the tool works the same way in Windows. To follow along with this video, you can draw your own shapes or download the file…
This video gives you a great overview about bandwidth monitoring with SNMP and WMI with our network monitoring solution PRTG Network Monitor (https://www.paessler.com/prtg). If you're looking for how to monitor bandwidth using netflow or packet s…

743 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

Need Help in Real-Time?

Connect with top rated Experts

8 Experts available now in Live!

Get 1:1 Help Now