ovais Posted November 13, 2009 Share Posted November 13, 2009 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 More sharing options...
rajuchacha007 Posted April 15, 2010 Share Posted April 15, 2010 Hello, Have you found any solution about this problem? I am looking for the same. Please do let me know how and what did you do? Best regards. Link to comment Share on other sites More sharing options...
slow Posted April 15, 2010 Share Posted April 15, 2010 "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 More sharing options...
vbence Posted January 21, 2015 Share Posted January 21, 2015 Hy!I created an example and it's work for me in Jaspersoft Studio, when I run in the Preview section with given the input parameter.This is the connected jrxml part:And the filtered output:Good luck,Bence Link to comment Share on other sites More sharing options...
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now