Jump to content
We've recently updated our Privacy Statement, available here ×

Optional Query Parameters


2004 IR Help

Recommended Posts

By: schmoboy - schmoboy

Optional Query Parameters

2005-05-26 10:44

I am struggling to handle the following scenario...

 

I have a query string like the following:

 

SELECT * from tablex

where tablex.fieldone in ($P!{valuelist})

 

But... if they select nothing or "All" for the parameter list I want to just do the following:

 

SELECT * from tablex

 

Is this possible?

 

 

 

 

 

 

By: Dmitry Beransky - dberansky

RE: Optional Query Parameters

2005-05-26 16:51

Build the entire query outside the report, not just the value list.

 

 

 

 

By: schmoboy - schmoboy

RE: Optional Query Parameters

2005-05-26 18:04

That would be great, but I'm running the report from OpenReports and that isn't an option.

 

 

 

 

By: jorge - sirion_oef

RE: Optional Query Parameters

2005-05-31 08:44

change to iReport, is better.

 

put "where tablex.fieldone in ($P!{valuelist}) " in a var, use other var that indicate if they select nothing or "All", then do:

 

"SELECT * from tablex " + ($P{All}.equals("1") ? $V{Criteria} : "")

 

 

 

 

By: Vinod Kumar Singh - vinodsingh

RE: Optional Query Parameters

2005-05-31 20:43

try to pass entire where clause as parameter, and in case of 'ALL' pass an empty String

Link to comment
Share on other sites

  • Replies 0
  • Created
  • Last Reply

Top Posters In This Topic

Popular Days

Top Posters In This Topic

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

×
×
  • Create New...