Hi i am using IReport/Jasper Reports and the query for my situation is SELECT * FROM admin WHERE age=$P{age} and tnumber=$P{tno} Now i am getting input for both fields ie age and tnumber from user.In this case three possible condition occurscond1:- user may enter both age and tumber fieldscond2:- user may enter only agecond3:- user may enter only tnumber Above query is executed only if user enters both values, if user enters value for a single field it shows document has no pages. i want to satisfy all my condition(cond1,2,3) in a single query, Please help me by suggesting necessary query for above condition.. Thanks in advance..