Solved

Prob with parameter in where clause in iReports

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

Live: Real-Time Solutions, Start Here

Receive instant 1:1 support from technology experts, using our real-time conversation and whiteboard interface. Your first 5 minutes are always free.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
difference between member and local variables. 29 133
constructor overloading 2 82
build fail in maven project 11 186
Retrieving file from bytes array in spring mvc 8 60
One of the biggest threats in the cyber realm pertains to advanced persistent threats (APTs). This paper is a compare and contrast of Russian and Chinese APT's.
This tutorial shows how to create a greeting card by combining two image layers and a text layer on a PC using a free image editing app.
Along with being a a promotional video for my three-day Annielytics Dashboard Seminor, this Micro Tutorial is an intro to Google Analytics API data.
A short tutorial showing how to set up an email signature in Outlook on the Web (previously known as OWA). For free email signatures designs, visit https://www.mail-signatures.com/articles/signature-templates/?sts=6651 If you want to manage em…

776 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