wood burning stoves
The moose likes Other Open Source Projects and the fly likes Jasper - Query with parameters Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Products » Other Open Source Projects
Bookmark "Jasper - Query with parameters " Watch "Jasper - Query with parameters " New topic

Jasper - Query with parameters

Pablo M�ller
Ranch Hand

Joined: Dec 12, 2006
Posts: 63
I'm starting to use jasper and I need to pass some parameters to a query for the where clause, but if the parameters are null (or "", etc) I don't want the where to be there. Is there any way to do this without providing the whole query as a parameter?

2B || !2B
Marco All

Joined: Mar 05, 2009
Posts: 13
I love to recover old "discussion"

I use JasperServer and iReport.

I've a query like: "SELECT * FROM contact WHERE code='01' " and I would like that the user could decide to enter the code 01 or the code 02 before the launch.

I've tried to use the input control but that was a good way to do that...

Do you have any suggestion?
Martijn Verburg

Joined: Jun 24, 2003
Posts: 3275

Hi Marco,

We try to NotWakeTheZombies. Can you post your problem in a new thread please

Cheers, Martijn - Blog,
Twitter, PCGen, Ikasan, My The Well-Grounded Java Developer book!,
My start-up.
I agree. Here's the link: http://aspose.com/file-tools
subject: Jasper - Query with parameters
It's not a secret anymore!