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

How to Use Filter Expressions in IReport


ovais

Recommended Posts

Dear All,

I m new to IReport, and i need to restrict my records to my specific criteria (like we use in WHERE clause in SQL) .. I am not using query for retrieving records, but by some other means..  In my report, i only want to show students of Grade V (for e.g.) but i dont know the proper syntax for retrieving specific records. This may also be done by using Filter Expressions but i dont know how to use it. I tried this in Filter Expression in my Report Query window. $P{GRADE}, where $P{GRADE} is the parameter i fixed as "Grade-V", but it doesnt work... All the expressions in I Report depends on the syntax <condition> ? true : false, but i need only true values like this <condition> ? true.... Can any one help me out..

Thanks,

Ovais

Link to comment
Share on other sites

  • 5 months later...
  • Replies 3
  • Created
  • Last Reply

Top Posters In This Topic

Top Posters In This Topic

Posted Images

"Filter Expression " expression must return a Boolean value...

so try this:

new Boolean($F{yourGradeField})=="Grade-V")

 

when I use parameter in the filter expression I note that only initialization value is applied... and not the value that I input in the prompt dialog...

new Boolean($F{yourGradeField})==$P{GRADE})

is it a bug?



Post Edited by slow at 04/15/2010 11:06
Link to comment
Share on other sites

  • 4 years later...

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