Jump to content

Dynamic SQL Where Clause


allmendinger

Recommended Posts

I have designed an iReport with one parameter $P{WhereClause} and my sql is as follows

 

Select * from qry_StockBalance Where $P!{WhereClause}

 

When I run in iReport the parameter box pops up and I type in

Balance > 1000

Balance < 1000

These both work fine.

 

I upload to JasperServer and add an input control to link to the WhereClause parameter.

 

When I run the report the parameter box pops up and I type in the following

Balance < 1000

This Works

If I type in

Balance > 1000

This does not work and I get the following;

 

The server has encountered an error. Please excuse the inconvenience.

An error has occurred. Please contact your system administrator. (5321)

 

Any help please.

Link to comment
Share on other sites

  • Replies 1
  • Created
  • Last Reply

Top Posters In This Topic

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...